----------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\mbeissin\Desktop\Stata files for book\Robustnesstestfiles\Logfiles\robustnesstestschapter9.log
  log type:  text
 opened on:  26 Jan 2022, 15:02:56

. * ============================================================================
. * ROBUSTNESS CHECKS FOR STATISTICAL RESULTS APPEARING IN CHAPTER 9
. * STATA  
. * Robustness checks for results reported in Chapter 9 
. * Author: Mark R. Beissinger  
. * Date:  January 2022  
. * Princeton, NJ 
. * =============================================================================
. * BEFORE RUNNING, YOU MUST SET THE DEFAULT PATH FOR WHERE THE DATA
. *   FILES RESIDE
. * =============================================================================
. * Before running, download the following packages for STATA:
. *       collin from https://stats.oarc.ucla.edu/stata/ado/analysis/
. *       eststo and esttab from http://www.stata-journal.com/software/sj14-2
. * ============================================================================
. * The following datafiles are used for this chapter:
. *   revolutionaryeps.dta--Cross-sectional dataset of revolutionary episodes
. *   matcheddiffindifflong.dta--Panel dataset of successful revolutions and 
. *               matched cases for pre-revolutionary and post-revolutionary periods
. *   simplediffindifflong.dta--Panel dataset of successful and failed urban 
. *               civic and social revolutionary episodes for pre-revolutionary 
. *               and post-revolutionary periods
. *   fullsamplediffindifflong.dta--Panel dataset of all revolutionary episodes
. *               for pre-revolutonary and post-revolutionary periods
. * =============================================================================
. * The following files are produced by these robustness tests: 
. *       --Robustnesstestfiles\Logfiles\robustnesstestschapter9.log
. *       --84 graphs of effects
. *               The graphs have been attached to the end of the pdf output file
. *                 produced for these robustness tests.
. * =============================================================================
. 
. * ***************************************************************************
. * PLEASE READ--IMPORTANT EXPLANATION OF WHAT FOLLOWS
. * ***************************************************************************
. *
. * In Chapter 9 of The Revolutionary City, the diff-and-diff analyses were
. * not used as a way of estimating treatment effects. The reasons for this
. * are detailed in Appendix 4G (pp. 488-492), which provides a discussion of
. * the ways in which revolutions violate the various assumptions of the 
. * diff-in-diff model necessary for estimating treatment effects. Instead, 
. * the diff-and-diff setup in Chapter 9 was used for purposes of controlled
. * comparison--for describing the evolution of the particular variables examined, 
. * to identify trends before and after revolution, and to compare these
. * between different types of revolutions, between succcessful and failed 
. * revolutionary episodes, and between countries experiencing revolutionary 
. * contention and matched counterparts that did not. 
. *
. * Indeed, many of the comparisons presented in Chapter 9 do not involve "treatment" 
. * at all, but rather compare patterns of development after different types of 
. * revolutions, or patterns of development in societies experiencing successful
. * revolutions with those that experienced failed ones.  There was no "treatment" 
. * effect that could be estimated in these cases, and the purpose instead was to
. * describe the different trajectories of the variables of interest under these 
. * constrasting conditions. The closest this chapter comes to potentially 
. * identifying a treatment effect for revolution was in its matched case 
. * comparisons that compared societies experiencing revolutionary contention with 
. * societies that were similar in many respects but did not experience revolutionary 
. * contention over the period. There are considerable issues involved
. * in such comparisons, though they are about the best that can be done to estimate
. * the counterfactual of what might have happened had revolution never occurred.
. * However, I did not estimate a "treatment" effect in these cases, preferring
. * instead to use the setup to compare rather than identify causaion. The 
. * quasi-"treatment" variable (revny) used in these specifications actually included  
. * both treatment and pre-treatment years rather than differentiating between 
. * "treatment" and pre-"treatment" years, as a normal diff-in-diff setup would do.
. * The year prior to revolutionary onset was used as the base for the comparison. 
. * The setup also included a unit-time control. 
. *
. * In these robustness tests, I instead explored the extent to which a "treatment"  
. * effect (ATET) could be estimated for all of the matched comparisons conducted 
. * in the chapter, as well as the extent to which some of the key statistical   
. * assumptions for estimating a treatment effect for revolution held (Please note 
. * that, as detailed in The Revolutionary City, there are other statistical
. * assumptions necessary for identifying treatment effects that are not tested
. * here and that may not hold true for many of the revolutionary episodes in the
. * sample). In particular, I explore: 1) if an ATET were estimated for the 
. * relationship, would it be statistically significant; 2) whether parallel 
. * trends assumptions for the pre-revolutionary period hold; 3) whether
. * treatment effects are observed in anticipation of actual treatment (i.e.,
. * Granger causation, in the sense that the outcome variable may be causing
. * treatment); 4) how stable any treatment effects are over the post-revolutionary 
. * period (through the introduction leads and lags); 5) whether the introduction 
. * of additional alternative treatment variables for times outside of revolutionary 
. * contention (i.e., immediately before and immediaately after revolution) affects 
. * the relationship (what some might think of as a kind of statistical placebo 
. * test, though this in no way should be considered a true placebo test, which is 
. * not possible in events like revolutions); and 6) whether the introduction 
. * of autoregressive lags for the dependent variable alters any relationships 
. * (given that the trajectory of many of the dependent variables is autoregressive). 
. *
. * As will be seen, only in a relatively few cases does revolution as a "treatment" 
. * fully pass these particular statistical hurdles to causal identification.
. * There are particular issues with social revolutions, as the small size of the 
. * samples for which data on the dependent variables were available severely challenges 
. * identification of "treatment" effects for social revolutions at conventional 
. * levels of statistical significance (The number of social revolutions in the 
. * sample ranges approximately from a low of 5 to a high of 11. One should 
. * therefore be cautious about drawing conclusions concerning the absence of any 
. * effect from social revolution in these cases.  The data are just too 
. * limited in most cases. Moreover, some causal processes are simply too slow-
. * moving to be captured in a statistically significant manner in these tests.
. * Thus, infant mortality and under-five child mortality change relatively slowly
. * over time; they may be affected by revolution (and there is some evidence that
. * they are), but the statistical significance of these effects may not be 
. * evident for many years after revolution.  Also, I do not test for the influence 
. * of other control variables that might affect relationships, but it should be  
. * noted that this kind of specification error is likely widespread in the tests  
. * presented below. 
. *
. * For these tests, I use the xtdidregress command and post-estimation tests 
. * that were newly available in Stata 17. These greatly simplify the processs of
. * of post-estimation tests. But for that reason, in contrast to all other do-files, 
. * this do-file requires Stata 17 to run the tests properly.
. *
. * In these robustness tests I also present graphs of average trends for all  
. * variables discussed in Chapter 9 that were not presented visually. The  
. * regression results themselves can be found in the Stata do-file for the chapter. 
. * Confidence intervals are not provided in these graphs to enhance the 
. * visibility of trends. All graphs produced were labeled and attached to the end  
. * of the pdf robustness test output files available for the chapter.
. *
. * ****************************************************************************
.         
. 
. * ***************************************************************************
. * INITIALIZING PROGRAMS USED IN THE ROBUSTNESS TESTS
. *       Programs initialized are called in the analyses below
. * ***************************************************************************
. 
. quietly{

. 
. 
. 
. * ****************************
. * INITATING ROBUSTNESS TESTS
. * ****************************
. 
. * +++++++++++++++++++++++++++++++++++
. * POST-REVOLUTIONARY REGIME SURVIVAL
. * +++++++++++++++++++++++++++++++++++
. clear

. use revolutionaryeps.dta, clear

. * Set survival data
. * Establish data as survival data with reglastyr variable--previously carried out
. quietly: stset reglastyr, failure(died==1) origin (time endyear)

. * Bootstrap tests
. bootstrap, reps(1000) seed(1234) nodots: stcox  leftist  vanguard  civilwar lndeaths lnmonths  c.vdcsrepressavg1to5##c.vdcsrepressavg1
> to5 if ongoing==0 & success==1

Cox regression with Breslow method for ties

Bootstrap results

No. of subjects =   107                                 Number of obs =    107
No. of failures =    70
Time at risk    = 1,820
                                                        Wald chi2(7)  =  25.50
Log likelihood = -258.30656                             Prob > chi2   = 0.0006

-----------------------------------------------------------------------------------------------------------
                                          |   Observed   Bootstrap                         Normal-based
                                       _t | haz. ratio   std. err.      z    P>|z|     [95% conf. interval]
------------------------------------------+----------------------------------------------------------------
                                  leftist |   .4991076   .2201541    -1.58   0.115     .2102486    1.184828
                                 vanguard |   .6600975   1.306162    -0.21   0.834     .0136553    31.90918
                                 civilwar |   1.181024   .8021738     0.24   0.806     .3119657    4.471063
                                 lndeaths |   1.054684   .0578188     0.97   0.331      .947237    1.174319
                              lnmonthsdur |    .581198   .1151422    -2.74   0.006     .3941768    .8569533
                       vdcsrepressavg1to5 |   2.732493   1.092446     2.51   0.012     1.248102    5.982299
                                          |
c.vdcsrepressavg1to5#c.vdcsrepressavg1to5 |   .8507068   .0933012    -1.47   0.140     .6861585    1.054716
-----------------------------------------------------------------------------------------------------------

. bootstrap, reps(1000) seed(1234) nodots: stcox  leftist  vanguard  civilwar lndeaths lnmonths  vdcsrepressavg1to5 if ongoing==0 & succ
> ess==1

Cox regression with Breslow method for ties

Bootstrap results

No. of subjects =   107                                 Number of obs =    107
No. of failures =    70
Time at risk    = 1,820
                                                        Wald chi2(6)  =  23.30
Log likelihood = -259.76712                             Prob > chi2   = 0.0007

------------------------------------------------------------------------------------
                   |   Observed   Bootstrap                         Normal-based
                _t | haz. ratio   std. err.      z    P>|z|     [95% conf. interval]
-------------------+----------------------------------------------------------------
           leftist |   .5698696   .2627684    -1.22   0.223     .2308257    1.406912
          vanguard |   .5038079   .9243287    -0.37   0.709     .0138222    18.36332
          civilwar |   1.070394   .7544563     0.10   0.923     .2688953     4.26093
          lndeaths |   1.058382    .057896     1.04   0.300     .9507792    1.178163
       lnmonthsdur |   .5683254   .1143768    -2.81   0.005     .3830812    .8431471
vdcsrepressavg1to5 |    1.52176   .2186656     2.92   0.003     1.148246    2.016775
------------------------------------------------------------------------------------

. *       RESULT: lnmonthsdur remains negative and significant at .05 level or better; 
. *                       vdcsrepressavg1to5 is positive and significant at .05 level or better only in univariate form
. * Multicollinearity test
. collin leftist vanguard civilwar lndeaths lnmonths vdcsrepressavg1to5
(obs=239)

  Collinearity Diagnostics

                        SQRT                   R-
  Variable      VIF     VIF    Tolerance    Squared
----------------------------------------------------
   leftist      1.67    1.29    0.5988      0.4012
  vanguard      1.60    1.27    0.6235      0.3765
  civilwar      3.68    1.92    0.2718      0.7282
  lndeaths      2.79    1.67    0.3579      0.6421
lnmonthsdur      2.97    1.72    0.3373      0.6627
vdcsrepressavg1to5      1.21    1.10    0.8296      0.1704
----------------------------------------------------
  Mean VIF      2.32

                           Cond
        Eigenval          Index
---------------------------------
    1     4.8284          1.0000
    2     1.0735          2.1208
    3     0.4701          3.2050
    4     0.3070          3.9658
    5     0.1801          5.1779
    6     0.0810          7.7210
    7     0.0600          8.9722
---------------------------------
 Condition Number         8.9722 
 Eigenvalues & Cond Index computed from scaled raw sscp (w/ intercept)
 Det(correlation matrix)    0.0717

. * All tolerance values above .20, indicating that while multicollinearity is substantial,
. *       it is likely not debilitating
. 
. * ===================================================================
. * STATE CAPACITY AFTER SUCCESSFUL SOCIAL AND URBAN CIVIC REVOLUTIONS
. * ===================================================================
. 
. * +++++++++++++++++++++++++++++++++++++
. * V-DEM MEASURE OF TERRITORIAL CONTROL
. * +++++++++++++++++++++++++++++++++++++
. //  SUCCESSFUL SOCIAL VS. SUCCESSFUL URBAN CIVIC
. * Regression results were presented in Chapter 9 do-file
. * Graph of results produced here
. use simplediffindifflong.dta, clear

. global yvar = "vdsvstterr"

. quietly{

. global condvar = "leftist==1"

. quietly: chp9simpmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.leftist##ib(2).year if success==1, fe vce(robust)

. quietly: mimrgns, at(leftist=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("% territory controlled") ylabel(80(5)100 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Urban civic" 2 "Social" )) not
> e("Graph #1" , span) title("`titvar1'" "Avg marginal predictions for successful episodes") plot1opts(msymbol(Oh) msize(medlarge)) plot
> 2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: leftist year

. graph export Robustnesstestfiles\Logfiles\robch9graph1.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph1.pdf saved as PDF format

. 
. * +++++++++++++++++++++++++++++++++++++++++++++++
. * MILITARY EXPENDITURE IN THE WAKE OF REVOLUTION
. * +++++++++++++++++++++++++++++++++++++++++++++++
. //  SUCCESSFUL SOCIAL VS. SUCCESSFUL URBAN CIVIC
. * Regression results were presented in Chapter 9 do-file
. * Graph of results produced here
. use simplediffindifflong.dta, clear

. global yvar = "milex"

. quietly{

. global condvar = "leftist==1"

. quietly: chp9simpmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.leftist##ib(2).year if success==1, fe vce(robust)

. quietly: mimrgns, at(leftist=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("$ mil expenditure") ylabel(1250000(250000)2750000 ,format(%9.0fc) angle(0)) legend(pos(6) cols(2) order(1 "Urban civic" 2 "Socia
> l" )) note("Graph #2" , span) title("`titvar1'" "Avg marginal predictions for successful episodes") plot1opts(msymbol(Oh) msize(medlar
> ge)) plot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: leftist year

. graph export Robustnesstestfiles\Logfiles\robch9graph2.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph2.pdf saved as PDF format

. 
. * +++++++++++++++++++++++++++++++
. * STATE CAPACITY (HANSON/SIGMAN) 
. * +++++++++++++++++++++++++++++++
. * Note that sample size is reduced due to temporal coverage of the data
. 
. // SUCCESSFUL SOCIAL VS. MATCHED CASES
. * Regression results were presented in Chapter 9 do-file
. * Will provide graph, test for treatment effect, and check treatment effect estimation assumptions
. use matcheddiffindifflong.dta, clear

. global yvar = "statecapacity"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. quietly{

. global condvar = "leftist==1 & success==1"

. quietly: chp9matchmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if $condvar [pweight=freqwt], fe cluster(revi
> d)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yl
> abel(-1(.25).5 ,format(%9.2fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "Successful social" )) note("Graph #3" , span) titl
> e("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph3.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph3.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. *       Treatment in this case consists of experiencing a successful social rev vs. no rev in matched cases
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (20):
  .........10.........20 done

Multiple-imputation estimates                   Imputations       =         20
                                                Number of obs     =        209
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.2094
                                                Largest FMI       =     0.1181
                                                Complete DF       =          3
DF adjustment:   Small sample                   DF:     min       =       1.97
                                                        avg       =       1.99
Within VCE type:       Robust                           max       =       2.00

                                 (Within VCE adjusted for 4 clusters in revid)
------------------------------------------------------------------------------
statecapac~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -.1361582    .229033    -0.59   0.612    -1.121723    .8494064
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0972319   .0300647     3.23   0.086    -.0341541     .228618
          2  |     .15589   .0806782     1.93   0.193    -.1919781    .5037581
          3  |   .0435925   .1186581     0.37   0.749     -.467843     .555028
          4  |   .0647796   .1170847     0.55   0.636    -.4398984    .5694576
          5  |   .1095085    .228751     0.48   0.679    -.8751886    1.094206
          6  |   .2814077   .1016789     2.77   0.110    -.1571225    .7199379
          7  |   .3163557   .1112767     2.84   0.105      -.16338    .7960913
          8  |   .3796759   .0983372     3.86   0.061    -.0445118    .8038636
          9  |   .3498217   .1297906     2.70   0.115    -.2094364    .9090799
         10  |   .2484508   .1287707     1.93   0.194    -.3064257    .8033272
             |
       _cons |  -.6165139   .1561886    -3.95   0.059    -1.288919    .0558912
------------------------------------------------------------------------------

.         * RESULT:  Negative, but no statistically significant effect (likely sample too small; visual evidence of possible effect)
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over  imputations: F-score = .15754666   p-value = .71797641

.         * RESULT: Statistically insignificant: no evidence of parallel trends assumption violation
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 20 imputations: F-score = 1.3729535   p-value = .3772628

.         * RESULT: Statistically insignificant: no evidence that treatment effects were observed prior to treatment period.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(centered) alignment(bottom)) ciopts(recast(rcap)) note("Graph #4" , span) title("`titvar1'""Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))
(note:  named style centered not found in class horizontal, default attributes used)

. graph export Robustnesstestfiles\Logfiles\robch9graph4.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph4.pdf saved as PDF format

.         * RESULT:  The negative impact of revolution on state capacity is short-term, and dissipates relatively quickly.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  statecapacity
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              -0.136                                                                   
                  (-0.59)                                                                   
alttreat                           0.0226          0.0590           0.280           0.398   
                                   (0.23)          (0.54)          (1.15)          (1.93)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              -0.144          -0.176          -0.381          -0.434   
                                  (-0.68)         (-0.97)         (-1.83)         (-1.84)   
--------------------------------------------------------------------------------------------
N                     209             209             209             209             209   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence of any statistically significant effects.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for statecapacity
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              -0.136          -0.233          -0.307          -0.263   
                  (0.229)         (0.141)         (0.174)         (0.148)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.367**                         0.386** 
                                 (0.0272)                        (0.0251)   
laggeddv2                                           0.156         -0.0584   
                                                 (0.0810)        (0.0683)   
----------------------------------------------------------------------------
N                     209             207             206             205   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence of AR1 process, but no influence on the treatment variable
. 
.         
. // SUCCESSFUL URBAN CIVIC VS. MATCHED CASES
. * Regression results were presented in Chapter 9 do-file
. * Will provide graph, test for treatment effect, and check treatment effect estimation assumptions
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. quietly{

. global condvar = "urbancivic==1 & success==1"

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if $condvar [pweight=freqwt], fe cluster(revi
> d)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yl
> abel(-.5(.25).5 ,format(%9.2fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "Successful urban civic" )) note("Graph #5" , span
> ) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph5.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph5.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment in this case consists of experiencing a successful urban civic rev vs. no rev in matched cases
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (20):
  .........10.........20 done

Multiple-imputation estimates                   Imputations       =         20
                                                Number of obs     =        748
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.4036
                                                Largest FMI       =     0.2853
                                                Complete DF       =         20
DF adjustment:   Small sample                   DF:     min       =      13.01
                                                        avg       =      16.02
Within VCE type:       Robust                           max       =      18.26

                                (Within VCE adjusted for 21 clusters in revid)
------------------------------------------------------------------------------
statecapac~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -.0793325   .0862285    -0.92   0.374    -.2655975    .1069325
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0094092   .0185843     0.51   0.619    -.0295951    .0484135
          2  |  -.0069627    .031193    -0.22   0.826    -.0726002    .0586748
          3  |  -.0492139   .0724958    -0.68   0.508    -.2045022    .1060744
          4  |  -.0337453   .0785081    -0.43   0.673    -.2006065     .133116
          5  |  -.0011683   .0679685    -0.02   0.987    -.1462582    .1439215
          6  |   .0017231   .0787955     0.02   0.983    -.1654984    .1689446
          7  |   .0449092   .0724867     0.62   0.544    -.1084636    .1982821
          8  |   .0546692   .0717446     0.76   0.458      -.09793    .2072683
          9  |   .0484874   .0721537     0.67   0.511     -.104162    .2011368
         10  |   .0594731   .0774886     0.77   0.453    -.1042002    .2231465
             |
       _cons |   -.006852   .0460484    -0.15   0.883    -.1034972    .0897932
------------------------------------------------------------------------------

.         * RESULT:  Negative, but not statistically significant
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 20 imputations: F-score = 1.5117208   p-value = .23314551

.         * RESULT: No statistically significant evidence of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 20 imputations: F-score = 2.1359601   p-value = .14429743

.         * RESULT: Statistically insignificant: no evidence that treatment effects were observed prior to treatment period. 
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot
. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(centered) alignment(bottom)) ciopts(recast(rcap)) note("Graph #6" , span) title("`titvar1'""Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))
(note:  named style centered not found in class horizontal, default attributes used)

. graph export Robustnesstestfiles\Logfiles\robch9graph6.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph6.pdf saved as PDF format

.         * RESULT:  The negative impact of revolution on state capacity is short-term, and dissipates relatively quickly.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  statecapacity
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat             -0.0793                                                                   
                  (-0.92)                                                                   
alttreat                           0.0404          0.0854          0.0269         -0.0326   
                                   (0.80)          (1.47)          (0.27)         (-0.35)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                             -0.0928          -0.136          -0.103         -0.0549   
                                  (-1.05)         (-1.41)         (-1.41)         (-0.71)   
--------------------------------------------------------------------------------------------
N                     748             748             748             748             748   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence of any statistically significant effects.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. * Control for possible effect of lagged values of the dependent variable on treatment effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for statecapacity
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat             -0.0793         -0.0813          -0.117          -0.107   
                 (0.0862)        (0.0767)        (0.0911)        (0.0765)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.265***                        0.305** 
                                 (0.0647)                        (0.0829)   
laggeddv2                                          0.0947*        -0.0687   
                                                 (0.0335)        (0.0438)   
----------------------------------------------------------------------------
N                     748             728             708             708   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence of AR1 process, but no influence on the treatment variable
. 
.         
. * =================================
. * ECONOMIC GROWTH--MATCHED SAMPLES
. * =================================
. * Regression results were presented in Chapter 9 do-file, and graphs provided
. *       in Figures 9.4-9.6
. * Will test for treatment effects, and check treatment effect estimation assumptions
. 
. // FAILED REVOLUTIONS VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "gdpa1990index"

. label var gdpa1990index "Indexed GDPpc (100=yr<onset)"

. global notetext "FAILED VS. MATCHED CASES"

. quietly{

. global condvar = "success==0"

. quietly: chp9matchmultimp

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a failed rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =      2,332
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0250
                                                Largest FMI       =     0.0213
                                                Complete DF       =         61
DF adjustment:   Small sample                   DF:     min       =      57.79
                                                        avg       =      58.53
Within VCE type:       Robust                           max       =      58.93

                                (Within VCE adjusted for 62 clusters in revid)
------------------------------------------------------------------------------
gdpa1990in~x | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -6.391652   3.207694    -1.99   0.051    -12.81305    .0297406
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   1.807136   .5256224     3.44   0.001      .755107    2.859166
          2  |   3.928933   .8498004     4.62   0.000       2.2279    5.629965
          3  |   10.87778   2.418899     4.50   0.000     6.036814    15.71874
          4  |   13.63046   2.446375     5.57   0.000     8.735019    18.52591
          5  |   16.09012   2.556122     6.29   0.000     10.97505    21.20519
          6  |   18.74534   2.707548     6.92   0.000     13.32727    24.16341
          7  |   21.57012   2.802247     7.70   0.000     15.96216    27.17808
          8  |   25.51252   2.910025     8.77   0.000      19.6887    31.33633
          9  |   28.36703   3.057956     9.28   0.000     22.24699    34.48707
         10  |   30.40768   3.162257     9.62   0.000     24.07858    36.73677
             |
       _cons |   96.07107   2.090223    45.96   0.000     91.88844    100.2537
------------------------------------------------------------------------------

.         * RESULT:  Marginally statistically significant at the .10 level
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 20 imputations: F-score = 2.3185974   p-value = .13300285

.         * RESULT: No statistically significant evidence of violation of the parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.8477549   p-value = .06570732

.         * RESULT: Marginally statistically significant evidence (at the .10 level) that the effects were observed prior to treatment.
.         *       Treatment is likely related to economic development.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(centered) alignment(bottom)) ciopts(recast(rcap)) note("Graph #7" , span) title("`titvar1'""Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))
(note:  named style centered not found in class horizontal, default attributes used)

. graph export Robustnesstestfiles\Logfiles\robch9graph7.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph7.pdf saved as PDF format

.         * RESULT:  Effect substantial at first but mitigated over time
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  gdpa1990index
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              -6.392+                                                                  
                  (-1.99)                                                                   
alttreat                           -2.431+         -1.011           3.325           3.432+  
                                  (-1.87)         (-0.96)          (1.59)          (1.69)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              -5.581+         -5.717+         -9.301***       -8.965***
                                  (-1.84)         (-1.96)         (-4.06)         (-3.85)   
--------------------------------------------------------------------------------------------
N                    2332            2332            2332            2332            2332   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence of any diminution of statistical significance in the treatment variable.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. * Control for possible effect of lagged values of the dependent variable on treatment effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for gdpa1990index
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              -6.392+         -1.377          -2.675          -1.666   
                  (3.208)         (1.729)         (2.595)         (1.761)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.583***                        0.622***
                                 (0.0284)                        (0.0387)   
laggeddv2                                           0.363***      -0.0550** 
                                                 (0.0281)        (0.0203)   
----------------------------------------------------------------------------
N                    2332            2313            2301            2297   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Evidence of AR1 and AR2 processes that diminish the statistical significance of treatment.
. 
. 
. // SUCCESSFUL REVOLUTIONS VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL VS. MATCHED CASES"

. quietly{

. global condvar = "success==1"

. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =      2,255
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0571
                                                Largest FMI       =     0.0849
                                                Complete DF       =         58
DF adjustment:   Small sample                   DF:     min       =      49.78
                                                        avg       =      53.05
Within VCE type:       Robust                           max       =      55.71

                                (Within VCE adjusted for 59 clusters in revid)
------------------------------------------------------------------------------
gdpa1990in~x | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -11.69404    2.97872    -3.93   0.000    -17.66732   -5.720774
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   1.075444   .5717871     1.88   0.066    -.0723123    2.223201
          2  |   2.326534   .9082578     2.56   0.013     .5059584    4.147111
          3  |   5.946918   1.812616     3.28   0.002      2.30577    9.588066
          4  |   7.028262   2.051847     3.43   0.001     2.910914    11.14561
          5  |   9.078346   2.354283     3.86   0.000     4.355434    13.80126
          6  |   11.38632   2.640096     4.31   0.000     6.091621    16.68103
          7  |   14.39778   2.887611     4.99   0.000     8.608001    20.18756
          8  |   16.60914   2.981057     5.57   0.000     10.63095    22.58732
          9  |   19.48245   3.199849     6.09   0.000     13.06582    25.89909
         10  |   22.27499   3.427637     6.50   0.000     15.40086    29.14911
             |
       _cons |   97.67347   1.773584    55.07   0.000     94.12015    101.2268
------------------------------------------------------------------------------

.         * RESULT:  Statistically significant at the .001 level--on average, an 11.7% decline
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 3.9218048   p-value = .05241387

.         * RESULT: Marginally statistically significant evidence, at the .10 level, of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.7877091   p-value = .06982714

.         * RESULT: Marginally statistically significant evidence (at the .10 level) that the effects were observed prior to treatment.
.         *       Treatment is likely related to economic development.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(centered) alignment(bottom)) ciopts(recast(rcap)) note("Graph #8" , span) title("`titvar1'""Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))
(note:  named style centered not found in class horizontal, default attributes used)

. graph export Robustnesstestfiles\Logfiles\robch9graph8.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph8.pdf saved as PDF format

.         * RESULT:  Statistically significant evidence that the effects of "treatment" grow more substantial over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  gdpa1990index
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              -11.69***                                                                
                  (-3.93)                                                                   
alttreat                           -1.620          -2.194*         -2.847          -2.684   
                                  (-1.43)         (-2.10)         (-1.37)         (-1.29)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              -11.15***       -10.23***       -9.203***       -9.681***
                                  (-3.97)         (-3.86)         (-3.72)         (-3.85)   
--------------------------------------------------------------------------------------------
N                    2255            2255            2255            2255            2255   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Statistically significant evidence of a decline in t-1, but this does not undermine the statistical significance of
>  treatment.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for gdpa1990index
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              -11.69***       -4.731*         -7.716**        -5.108** 
                  (2.979)         (1.818)         (2.633)         (1.839)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.528***                        0.591***
                                 (0.0597)                        (0.0544)   
laggeddv2                                           0.276***      -0.0928** 
                                                 (0.0677)        (0.0301)   
----------------------------------------------------------------------------
N                    2255            2230            2213            2210   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: AR1 and AR2 processes that influence the outcome, but do not undermine the statistical significance of treatment.
. 
.         
. // FAILED SOCIAL VS. MATCHED COUNTERPARTS 
. global notetext "FAILED SOCIAL VS. MATCHED CASES"

. quietly {

. global condvar = "success==0 & leftist==1"

. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a failed social rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        836
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0937
                                                Largest FMI       =     0.0864
                                                Complete DF       =         22
DF adjustment:   Small sample                   DF:     min       =      18.55
                                                        avg       =      19.82
Within VCE type:       Robust                           max       =      20.18

                                (Within VCE adjusted for 23 clusters in revid)
------------------------------------------------------------------------------
gdpa1990in~x | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -11.08686   4.320341    -2.57   0.019    -20.14447   -2.029255
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   2.107057   .7470017     2.82   0.011     .5446137      3.6695
          2  |   3.581124   1.403964     2.55   0.019     .6452344    6.517013
          3  |   17.22565   5.165029     3.34   0.003     6.452897     27.9984
          4  |   19.64078   5.322925     3.69   0.001     8.540566      30.741
          5  |   22.09884   5.455023     4.05   0.001     10.72208    33.47561
          6  |   24.80913   5.535361     4.48   0.000     13.26423    36.35403
          7  |   26.80248   5.613828     4.77   0.000      15.0958    38.50915
          8  |   29.92242   5.873501     5.09   0.000     17.67618    42.16866
          9  |   33.18124   6.234888     5.32   0.000     20.18273    46.17974
         10  |   34.27431   6.222105     5.51   0.000     21.30032     47.2483
             |
       _cons |   96.41888   3.248374    29.68   0.000     89.64437    103.1934
------------------------------------------------------------------------------

.         * RESULT:  Statistically significant at the .05 level, with an avg decline of 11.1% as a result of "treatment"
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.7591347   p-value = .11088687

.         * RESULT: No statistically significant evidence of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.6753621   p-value = .2102594

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #9" , span) title("`titvar1'" "Effects over time (lea
> ds & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph9.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph9.pdf saved as PDF format

.         * RESULT:  Statistically significant evidence that the effects of "treatment" lasts at least 4 yrs, 
.         *    and then begins to mitigate.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  gdpa1990index
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              -11.09*                                                                  
                  (-2.57)                                                                   
alttreat                           -2.600          -1.991           0.502           0.112   
                                  (-1.72)         (-1.35)          (0.19)          (0.04)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              -10.22*         -9.759*         -11.53**        -11.17** 
                                  (-2.50)         (-2.54)         (-3.43)         (-3.10)   
--------------------------------------------------------------------------------------------
N                     836             836             836             836             836   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence of alternative treatments affecting the relationship.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for gdpa1990index
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              -11.09*         -3.056          -5.614          -3.402   
                  (4.320)         (3.058)         (4.413)         (2.944)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.589***                        0.653***
                                 (0.0482)                        (0.0581)   
laggeddv2                                           0.359***      -0.0854*  
                                                 (0.0540)        (0.0341)   
----------------------------------------------------------------------------
N                     836             830             826             826   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: AR1 and AR2 processes appear to undermine the statistical significance of treatment.
. 
.         
. // SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS 
. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. quietly{

. global condvar = "success==1 & leftist==1"

. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.3395
                                                Largest FMI       =     0.2160
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       5.42
                                                        avg       =       5.97
Within VCE type:       Robust                           max       =       6.51

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
gdpa1990in~x | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -18.49933   9.748396    -1.90   0.103    -41.98398    4.985321
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |    2.27718   1.153978     1.97   0.093    -.5017408    5.056102
          2  |   2.615691    1.10375     2.37   0.053    -.0500657    5.281448
          3  |   10.45343   3.847393     2.72   0.035     1.015695    19.89117
          4  |   11.92492   4.049978     2.94   0.026     1.995221    21.85462
          5  |   14.24351   4.018749     3.54   0.013     4.366404    24.12062
          6  |   17.67735   3.725883     4.74   0.004     8.444486    26.91022
          7  |   19.68772    3.86074     5.10   0.003      10.1163    29.25913
          8  |   21.47199   4.023004     5.34   0.002     11.47333    31.47065
          9  |   23.82273   4.421792     5.39   0.002     12.83812    34.80733
         10  |   25.64422   4.069291     6.30   0.001     15.42431    35.86414
             |
       _cons |   97.38431   2.742052    35.52   0.000     90.80085    103.9678
------------------------------------------------------------------------------

.         * RESULT:  Not statistically significant (due to small sample size), but quite substantial decline of 18.5% as a result of tre
> atment
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 5.7827762   p-value = .04285851

.         * RESULT: Statistically significant evidence (at the .05 level) of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.9759072   p-value = .10810286

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #10" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph10.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph10.pdf saved as PDF format

.         * RESULT:  Effect is statistically significant for the first 3 yrs after rev, and then begins to mitigate.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  gdpa1990index
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              -18.50                                                                   
                  (-1.90)                                                                   
alttreat                           -3.044+         -5.158+         -1.317           2.233   
                                  (-2.16)         (-2.20)         (-0.27)          (0.42)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              -17.48          -15.06          -17.35          -20.17+  
                                  (-1.81)         (-1.64)         (-1.83)         (-2.01)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence of alternative treatments affecting the relationship in a substantial way.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for gdpa1990index
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              -18.50          -11.29          -16.09          -12.08   
                  (9.748)         (6.437)         (8.672)         (6.403)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.334+                          0.456*  
                                  (0.149)                         (0.147)   
laggeddv2                                          0.0927          -0.162+  
                                                  (0.145)        (0.0842)   
----------------------------------------------------------------------------
N                     374             372             371             371   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: AR1 and AR2 processes, but do not alter the relationship.
. 
. 
. // FAILED URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "FAILED URBAN CIVIC VS. MATCHED CASES"

. quietly{

. global condvar = "success==0 & urbancivic==1"

. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a failed urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        418
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0000
                                                Largest FMI       =     0.0000
                                                Complete DF       =          9
DF adjustment:   Small sample                   DF:     min       =       7.50
                                                        avg       =       7.50
Within VCE type:       Robust                           max       =       7.50

                                (Within VCE adjusted for 10 clusters in revid)
------------------------------------------------------------------------------
gdpa1990in~x | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   5.961861   10.16354     0.59   0.575    -17.75008     29.6738
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   2.751618   1.135886     2.42   0.044     .1015501    5.401686
          2  |   6.199059   1.622785     3.82   0.006     2.413037    9.985082
          3  |   3.898805   2.320746     1.68   0.134    -1.515587    9.313198
          4  |   6.900042   2.637782     2.62   0.033     .7459913    13.05409
          5  |   11.23661   4.309091     2.61   0.033     1.183329    21.28989
          6  |   15.22695    4.83438     3.15   0.015     3.948149    26.50575
          7  |   19.23071   5.352795     3.59   0.008     6.742426    31.71899
          8  |   23.32489    5.89211     3.96   0.005     9.578362    37.07141
          9  |   26.51954   5.981586     4.43   0.003     12.56426    40.47482
         10  |   28.47968   6.650205     4.28   0.003     12.96449    43.99487
             |
       _cons |   93.80094   6.244575    15.02   0.000      79.2321    108.3698
------------------------------------------------------------------------------

.         * RESULT:  Positive, but not statistically significant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .04309756   p-value = .84016313

.         * RESULT: No statistically significant evidence of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .46470146   p-value = .64259478

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #11" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph11.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph11.pdf saved as PDF format

.         * RESULT:  Not statistically significant, but sign seems to reverse after 1 year.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  gdpa1990index
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat               5.962                                                                   
                   (0.59)                                                                   
alttreat                           -0.694          0.0310           9.021           10.36   
                                  (-0.42)          (0.02)          (1.04)          (1.30)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                               6.193           5.941          -1.931          -1.809   
                                   (0.62)          (0.61)         (-0.57)         (-0.37)   
--------------------------------------------------------------------------------------------
N                     418             418             418             418             418   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence of alternative treatments being statistically significant or affecting the relationship in a substantia
> l way.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for gdpa1990index
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat               5.962           4.356           6.167           3.912   
                  (10.16)         (2.807)         (4.575)         (2.933)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.665***                        0.744***
                                 (0.0325)                        (0.0699)   
laggeddv2                                           0.460***      -0.0944+  
                                                 (0.0279)        (0.0479)   
----------------------------------------------------------------------------
N                     418             417             416             416   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes, but do not alter the treatment variable substantially.
. 
. 
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS 
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. quietly{

. global condvar = "success==1 & urbancivic==1"

. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a failed urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        946
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.1830
                                                Largest FMI       =     0.0775
                                                Complete DF       =         25
DF adjustment:   Small sample                   DF:     min       =      21.43
                                                        avg       =      22.60
Within VCE type:       Robust                           max       =      23.06

                                (Within VCE adjusted for 26 clusters in revid)
------------------------------------------------------------------------------
gdpa1990in~x | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -6.046674   3.832987    -1.58   0.129    -13.99765    1.904303
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   2.008243    .636664     3.15   0.005     .6858341    3.330651
          2  |   3.936135    1.04954     3.75   0.001     1.758421    6.113848
          3  |   7.458094   2.412358     3.09   0.005     2.462489     12.4537
          4  |   8.730197    2.96303     2.95   0.007     2.598634    14.86176
          5  |   10.31503   3.588425     2.87   0.009     2.892075    17.73798
          6  |   12.48468   4.085387     3.06   0.006     4.030649    20.93872
          7  |   15.49804    4.60814     3.36   0.003     5.965534    25.03055
          8  |   18.00698   4.747302     3.79   0.001      8.18783    27.82613
          9  |    20.6107   5.086344     4.05   0.000     10.08653    31.13486
         10  |   24.05228   5.527726     4.35   0.000     12.61147    35.49308
             |
       _cons |   96.06387   2.693417    35.67   0.000     90.49238    101.6353
------------------------------------------------------------------------------

.         * RESULT:  Negative, but not statistically significant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .53383711   p-value = .47179052

.         * RESULT: No statistically significant evidence of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.5220559   p-value = .10052128

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #12" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph12.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph12.pdf saved as PDF format

.         * RESULT:  Not statistically significant, but the negative effect grows more substantial over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  gdpa1990index
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              -6.047                                                                   
                  (-1.58)                                                                   
alttreat                           -0.459          -1.274          -3.458          -3.694   
                                  (-0.33)         (-1.01)         (-1.11)         (-1.15)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              -5.894          -5.197          -3.021+         -3.276+  
                                  (-1.61)         (-1.47)         (-1.90)         (-1.81)   
--------------------------------------------------------------------------------------------
N                     946             946             946             946             946   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence of alternative treatments being statistically significant or affecting the relationship in a substantia
> l way.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for gdpa1990index
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              -6.047          -1.519          -2.789          -1.521   
                  (3.833)         (2.602)         (3.594)         (2.474)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.580***                        0.625***
                                 (0.0685)                        (0.0605)   
laggeddv2                                           0.337***      -0.0751+  
                                                 (0.0873)        (0.0412)   
----------------------------------------------------------------------------
N                     946             930             915             915   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes, but do not alter the treatment variable substantially.
. 
. 
. 
. *=======================================================================
. * RELATIONSHIP BETWEEN HENISZ MEASURE OF POLITICAL CONSTRAINTS AND 
. *    POST-REVOLUTIONARY SOCIAL REVOLUTIONARY AND URBAN CIVIC GOVERNANCE
. *=======================================================================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE
. * Will provide graphs and check causal effect assumptions
. 
. // SUCCESSSFUL SOCIAL VS. SUCCESSFUL URBAN CIVIC
. quietly: use simplediffindifflong.dta, clear

. quietly: global yvar = "polconiii"

. quietly{

. quietly: chp9simpmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.leftist##ib(2).year if success==1, fe vce(robust)

. quietly: mimrgns, at(leftist=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Pol constraints measure") ylabel(-.1(.1).7 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Urban civic" 2 "Social" )) n
> ote("Graph #13" , span) title("`titvar1'" "Avg marginal predictions for successful episodes") plot1opts(msymbol(Oh) msize(medlarge)) p
> lot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: leftist year

. graph export Robustnesstestfiles\Logfiles\robch9graph13.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph13.pdf saved as PDF format

. 
. // SUCCESSFUL SOCIAL VS. FAILED SOCIAL
. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.success##ib(2).year if leftist==1, fe vce(robust)

. quietly: mimrgns, at(success=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Pol constraints measure") ylabel(-.1(.1).7 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Failed" 2 "Successful" )) no
> te("Graph #14" , span) title("`titvar1'" "Avg marginal predictions for social revolutionary episodes") plot1opts(msymbol(Oh) msize(med
> large)) plot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: success year

. graph export Robustnesstestfiles\Logfiles\robch9graph14.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph14.pdf saved as PDF format

. 
. // SUCCESSFUL URBAN CIVIC VS. FAILED URBAN CIVIC
. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.success##ib(2).year if urbancivic==1, fe vce(robust)

. quietly: mimrgns, at(success=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Pol constraints measure") ylabel(-.1(.1).7 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Failed" 2 "Successful" )) no
> te("Graph #15" , span) title("`titvar1'" "Avg marginal predictions for urban civic episodes") plot1opts(msymbol(Oh) msize(medlarge)) p
> lot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: success year

. graph export Robustnesstestfiles\Logfiles\robch9graph15.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph15.pdf saved as PDF format

. 
. 
. // SUCCESSFUL SOCIAL VS. MATCHED CASES 
. use matcheddiffindifflong.dta, clear

. global yvar = "polconiii"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. quietly{

. global condvar = "success==1 & leftist==1"

. quietly: chp9matchmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if success==1 & leftist==1 [pweight=freqwt], 
> fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Pol constraints measure") ylabel(-.1(.1).7 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched cases" 2 "Succ socia
> l" )) note("Graph #16" , span) title("`titvar1'" "Avg marginal predictions, successful social vs. matched cases") plot1opts(msymbol(Oh
> ) msize(medlarge)) plot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph16.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph16.pdf saved as PDF format

. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a failed urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.5894
                                                Largest FMI       =     0.6203
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       2.83
                                                        avg       =       4.25
Within VCE type:       Robust                           max       =       5.76

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
   polconiii | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -.0136029   .0453964    -0.30   0.777    -.1319321    .1047263
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |  -.0004451   .0075398    -0.06   0.957    -.0252954    .0244052
          2  |   .0050097   .0101888     0.49   0.646    -.0221553    .0321748
          3  |   .0354852   .0414263     0.86   0.437     -.076885    .1478554
          4  |   .0374388   .0432798     0.87   0.434    -.0810964     .155974
          5  |   .0408411   .0476549     0.86   0.436     -.086739    .1684212
          6  |    .055344   .0438035     1.26   0.270    -.0624942    .1731821
          7  |   .0366496    .042788     0.86   0.440    -.0822498    .1555489
          8  |   .0568824   .0441196     1.29   0.265    -.0640656    .1778305
          9  |   .0596581   .0469892     1.27   0.274    -.0718529    .1911691
         10  |   .0676798   .0503298     1.34   0.251    -.0732848    .2086445
             |
       _cons |   .0367048   .0163308     2.25   0.067    -.0036564     .077066
------------------------------------------------------------------------------

.         * RESULT:  Not statistically significant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.2317024   p-value = .29931913

.         * RESULT: No statistically significant evidence of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.1185203   p-value = .37295998

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #17" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph17.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph17.pdf saved as PDF format

.         * RESULT:  Not statistically significant, but the signs shift over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  polconiii
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat             -0.0136                                                                   
                  (-0.30)                                                                   
alttreat                         -0.00990         -0.0153          0.0569          0.0431   
                                  (-0.47)         (-0.92)          (1.23)          (1.02)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                             -0.0103        -0.00338         -0.0634         -0.0460   
                                  (-0.22)         (-0.07)         (-1.42)         (-1.14)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence of alternative treatments being statistically significant or affecting the relationship in a substantia
> l way.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for polconiii
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat             -0.0136         0.00342        0.000650         0.00515   
                 (0.0454)        (0.0336)        (0.0397)        (0.0309)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.435**                         0.511** 
                                 (0.0922)                         (0.128)   
laggeddv2                                           0.158+         -0.136   
                                                 (0.0560)        (0.0829)   
----------------------------------------------------------------------------
N                     374             369             368             364   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 processes, but do not alter the treatment variable substantially.
. 
.         
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS 
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. quietly{

. global condvar = "success==1 & urbancivic==1"

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if success==1 & urbancivic==1 [pweight=freqwt
> ], fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Pol constraints measure") ylabel(-.1(.1).7 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched cases" 2 "Succ urban
>  civic" )) note("Graph #18" , span) title("`titvar1'" "Avg marginal predictions, succ urban civic vs. matched cases") plot1opts(msymbo
> l(Oh) msize(medlarge)) plot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph18.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph18.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a failed urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        869
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.1425
                                                Largest FMI       =     0.0713
                                                Complete DF       =         23
DF adjustment:   Small sample                   DF:     min       =      19.79
                                                        avg       =      20.70
Within VCE type:       Robust                           max       =      21.23

                                (Within VCE adjusted for 24 clusters in revid)
------------------------------------------------------------------------------
   polconiii | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .1185179   .0486348     2.44   0.024     .0172705    .2197653
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |  -.0124803    .013347    -0.94   0.360    -.0402188    .0152583
          2  |  -.0200967   .0196185    -1.02   0.317    -.0608697    .0206763
          3  |  -.0687964   .0299918    -2.29   0.032    -.1311871   -.0064056
          4  |   .0353947   .0396446     0.89   0.382    -.0470834    .1178729
          5  |   .0766321   .0285109     2.69   0.014     .0173006    .1359636
          6  |   .1081272   .0427682     2.53   0.020     .0191803     .197074
          7  |   .1118257   .0421359     2.65   0.015     .0241433    .1995082
          8  |   .1034139   .0391242     2.64   0.016     .0217509    .1850769
          9  |   .0715713   .0442771     1.62   0.122    -.0208516    .1639942
         10  |   .0726653   .0412053     1.76   0.093    -.0132363    .1585668
             |
       _cons |   .1469978   .0247971     5.93   0.000     .0954626     .198533
------------------------------------------------------------------------------

.         * RESULT:  Positive and statistically significant at the .05 level.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.9031577   p-value = .18099159

.         * RESULT: No statistically significant evidence of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .98503314   p-value = .38863653

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #19" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph19.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph19.pdf saved as PDF format

.         * RESULT:  Effect remains relatively stable and statistically significant over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  polconiii
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat               0.119*                                                                  
                   (2.44)                                                                   
alttreat                          -0.0320         -0.0273           0.193**         0.161***
                                  (-1.22)         (-1.36)          (3.23)          (3.95)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                               0.129*          0.137*        -0.0507        -0.00245   
                                   (2.63)          (2.79)         (-1.06)         (-0.05)   
--------------------------------------------------------------------------------------------
N                     869             869             869             869             869   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Post-revolutionary developments in the first two years after revolution appear to play a critical role, turning the
>  treatment effect
.         *                               statistically insignificant.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for polconiii
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat               0.119*         0.0911*          0.133**         0.107** 
                 (0.0486)        (0.0353)        (0.0428)        (0.0362)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.349***                        0.325***
                                 (0.0596)                        (0.0729)   
laggeddv2                                           0.146*        0.00317   
                                                 (0.0542)        (0.0547)   
----------------------------------------------------------------------------
N                     869             853             837             837   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes are present, but do not alter the statistical significance of the treatment varia
> ble.
. 
. 
. *=============================
. * CORRUPTION AFTER REVOLUTION
. *=============================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE, AND VISUAL RESULTS  
. *       PRESENTED IN FIGURE 9.7
. * For matched sample, will test for  treatment effect, and check treatment effect 
. *   estimation assumptions
. 
. 
. // SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "vdcorr"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. quietly{

. global condvar = "success==1 & leftist==1"

. quietly: chp9matchmultimp

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0000
                                                Largest FMI       =     0.0000
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       6.55
                                                        avg       =       6.55
Within VCE type:       Robust                           max       =       6.55

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
      vdcorr | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -.1381327   .0812343    -1.70   0.136    -.3329589    .0566934
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |    .004694   .0030997     1.51   0.177    -.0027402    .0121282
          2  |   .0022959   .0029821     0.77   0.468    -.0048562     .009448
          3  |   .0172973   .0277695     0.62   0.554    -.0493029    .0838975
          4  |  -.0124873   .0188282    -0.66   0.530    -.0576434    .0326687
          5  |  -.0136598   .0197712    -0.69   0.513    -.0610776     .033758
          6  |  -.0135132   .0210239    -0.64   0.542    -.0639354     .036909
          7  |  -.0099783   .0218446    -0.46   0.663    -.0623685     .042412
          8  |   -.002827    .023134    -0.12   0.906    -.0583099    .0526559
          9  |   .0095116   .0237737     0.40   0.702    -.0475054    .0665287
         10  |   .0107252   .0235445     0.46   0.663    -.0457422    .0671926
             |
       _cons |   .6392227   .0349637    18.28   0.000     .5553685     .723077
------------------------------------------------------------------------------

.         * RESULT:  Negative but not statistically significant (likely due to small number of social revolutions).
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.5804174   p-value = .2441598

.         * RESULT: No statistically significant evidence of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .79497106   p-value = .48427941

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #20" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph20.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph20.pdf saved as PDF format

.         * RESULT:  Effect remains relatively stable (though statistically insignificant) over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdcorr
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              -0.138                                                                   
                  (-1.70)                                                                   
alttreat                         -0.00704        -0.00722         -0.0624         -0.0320   
                                  (-1.09)         (-1.17)         (-1.39)         (-1.34)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              -0.136          -0.133         -0.0835          -0.114   
                                  (-1.67)         (-1.63)         (-1.42)         (-1.62)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence for alternative treatment effects at different times outside revolutionary contention.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdcorr
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              -0.138          -0.107+         -0.137          -0.101   
                 (0.0812)        (0.0554)        (0.0730)        (0.0549)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.428**                         0.520*  
                                  (0.100)                         (0.146)   
laggeddv2                                           0.205*         -0.114   
                                                 (0.0585)        (0.0694)   
----------------------------------------------------------------------------
N                     374             374             374             374   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence that AR1  processes are present, and these turn the treatment effect statistically significant at the .10 l
> evel
.         *       when included in the specification.
. 
. * SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. quietly{

. global condvar = "success==1 & urbancivic==1"

. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        946
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.2190
                                                Largest FMI       =     0.1113
                                                Complete DF       =         25
DF adjustment:   Small sample                   DF:     min       =      20.48
                                                        avg       =      22.46
Within VCE type:       Robust                           max       =      23.21

                                (Within VCE adjusted for 26 clusters in revid)
------------------------------------------------------------------------------
      vdcorr | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -.0802905   .0306621    -2.62   0.015    -.1437238   -.0168572
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0012302   .0025546     0.48   0.635    -.0040517    .0065122
          2  |   .0035532   .0058742     0.60   0.551    -.0085922    .0156986
          3  |    .017384   .0138605     1.25   0.222    -.0112942    .0460622
          4  |  -.0018138   .0116312    -0.16   0.877     -.025887    .0222594
          5  |   .0041897   .0105594     0.40   0.695    -.0176587    .0260381
          6  |   .0123101   .0118446     1.04   0.310    -.0122005    .0368208
          7  |   .0116905   .0121556     0.96   0.347    -.0135011     .036882
          8  |   .0163083   .0121668     1.34   0.194    -.0089702    .0415868
          9  |   .0164233   .0118458     1.39   0.180    -.0081887    .0410353
         10  |   .0144931    .012452     1.16   0.258     -.011442    .0404282
             |
       _cons |   .6892369   .0111924    61.58   0.000     .6660956    .7123782
------------------------------------------------------------------------------

.         * RESULT:  Negative and statistically significant at the .05 level.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.413197   p-value = .13288558

.         * RESULT: No statistically significant evidence of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.210721   p-value = .31486289

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #21" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph21.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph21.pdf saved as PDF format

.         * RESULT:  After an initial decline, effect grows statistically insignicant over time, as corruption
.         *    gradually re-emerges.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdcorr
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat             -0.0803*                                                                  
                  (-2.62)                                                                   
alttreat                         -0.00823         -0.0117         -0.0198        -0.00917   
                                  (-1.50)         (-1.49)         (-0.87)         (-0.48)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                             -0.0775*        -0.0725*        -0.0629*        -0.0734** 
                                  (-2.51)         (-2.26)         (-2.37)         (-3.00)   
--------------------------------------------------------------------------------------------
N                     946             946             946             946             946   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence of alternative treatment times, and no change to the statistical significance
.         *       of the treatment effect. 
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdcorr
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat             -0.0803*        -0.0737**       -0.0851*        -0.0718*  
                 (0.0307)        (0.0245)        (0.0319)        (0.0266)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.278***                        0.298***
                                 (0.0697)                        (0.0589)   
laggeddv2                                           0.137*        -0.0315   
                                                 (0.0608)        (0.0351)   
----------------------------------------------------------------------------
N                     946             930             916             914   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1  processes that do not alter the statistical significance of the treatment variable.
. 
. 
. *===============================================
. * IMPACT OF REVOLUTION ON INVESTMENT AS % OF GDP
. *===============================================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE
. * Will provide graphs, test for  treatment effects, and check treatment effect 
. *   estimation assumptions
. 
. // SUCCESSSFUL SOCIAL VS. SUCCESSFUL URBAN CIVIC
. quietly: use simplediffindifflong.dta, clear

. global yvar = "investtogdp"

. quietly{

. quietly: chp9simpmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.leftist##ib(2).year if success==1, fe vce(robust)

. quietly: mimrgns, at(leftist=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Investment as % of GDP") ylabel(10(5)30 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Urban civic" 2 "Social" )) note
> ("Graph #22" , span) title("`titvar1'" "Avg marginal predictions for successful episodes") plot1opts(msymbol(Oh) msize(medlarge)) plot
> 2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: leftist year

. graph export Robustnesstestfiles\Logfiles\robch9graph22.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph22.pdf saved as PDF format

. 
. * SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "investtogdp"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. quietly{

. global condvar = "success==1 & leftist==1"

. quietly: chp9matchmultimp

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        231
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0000
                                                Largest FMI       =     0.0000
                                                Complete DF       =          4
DF adjustment:   Small sample                   DF:     min       =       2.86
                                                        avg       =       2.86
Within VCE type:       Robust                           max       =       2.86

                                 (Within VCE adjusted for 5 clusters in revid)
------------------------------------------------------------------------------
 investtogdp | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -11.06397   5.347761    -2.07   0.135    -28.57461    6.446661
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   3.056005   1.000483     3.05   0.059    -.2199624    6.331973
          2  |   .1996877   2.168425     0.09   0.933    -6.900576    7.299951
          3  |  -.4826703   3.655347    -0.13   0.904    -12.45169    11.48635
          4  |   3.810754   2.938379     1.30   0.289    -5.810633    13.43214
          5  |   4.381772    1.90234     2.30   0.109    -1.847226    10.61077
          6  |   3.242194   2.370245     1.37   0.269    -4.518905    11.00329
          7  |   4.481318   3.131529     1.43   0.252     -5.77252    14.73516
          8  |   3.510442   3.332861     1.05   0.373    -7.402635    14.42352
          9  |    2.20907   3.292434     0.67   0.552    -8.571633    12.98977
         10  |   1.599485   3.603021     0.44   0.689     -10.1982    13.39717
             |
       _cons |   23.35115   2.240143    10.42   0.002     16.01606    30.68625
------------------------------------------------------------------------------

.         * RESULT:  Negative but not statistically significant (likely due to small number of social revolutions in sample).
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .59017581   p-value = .48519385

.         * RESULT: No statistically significant evidence of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .32280602   p-value = .74136846

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #23" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph23.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph23.pdf saved as PDF format

.         * RESULT:  Effect achieves statistically significance in 4 out of 8 lag years.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  investtogdp
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              -11.06                                                                   
                  (-2.07)                                                                   
alttreat                           -1.009          -3.530           4.817           1.401   
                                  (-0.70)         (-0.70)          (0.86)          (0.29)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              -10.73          -8.710+         -15.28+         -12.11   
                                  (-2.10)         (-2.99)         (-3.03)         (-2.28)   
--------------------------------------------------------------------------------------------
N                     231             231             231             231             231   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence for alternative treatment effects at different times outside revolutionary contention.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for investtogdp
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              -11.06          -9.367          -11.16          -8.783   
                  (5.348)         (4.868)         (5.157)         (3.689)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.243*                          0.357*  
                                 (0.0729)                         (0.107)   
laggeddv2                                          -0.116          -0.250   
                                                  (0.103)         (0.139)   
----------------------------------------------------------------------------
N                     231             231             231             231   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence that AR1  processes are present, but these do not affect the statistical
.         *       significance of treatment.
. 
.         
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global yvar = "investtogdp"

. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. quietly{

. global condvar = "success==1 & urbancivic==1"

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        759
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.2383
                                                Largest FMI       =     0.2777
                                                Complete DF       =         21
DF adjustment:   Small sample                   DF:     min       =      13.25
                                                        avg       =      16.58
Within VCE type:       Robust                           max       =      19.25

                                (Within VCE adjusted for 22 clusters in revid)
------------------------------------------------------------------------------
 investtogdp | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -1.066138   1.271132    -0.84   0.415    -3.781798    1.649522
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |  -.3441621   .4463805    -0.77   0.450    -1.277627    .5893025
          2  |  -.3716585   .5577327    -0.67   0.513    -1.537981    .7946642
          3  |  -1.254337   .9804701    -1.28   0.218    -3.318729    .8100543
          4  |  -1.410594   1.093468    -1.29   0.215    -3.720401    .8992124
          5  |   -.959926    .861624    -1.11   0.280    -2.775187    .8553348
          6  |  -.1429374   .9916764    -0.14   0.887     -2.24052    1.954645
          7  |   .2237885   1.249289     0.18   0.860     -2.44371    2.891287
          8  |   .0360772   1.175976     0.03   0.976    -2.499587    2.571742
          9  |  -.9100301   1.426703    -0.64   0.533    -3.942375    2.122314
         10  |  -.5939747   1.554257    -0.38   0.708    -3.903262    2.715313
             |
       _cons |   23.80554   .8139492    29.25   0.000     22.10342    25.50766
------------------------------------------------------------------------------

.         * RESULT:  Negative but not statistically significant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .44112416   p-value = .51380745

.         * RESULT: No statistically significant evidence of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .43143596   p-value = .65520452

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #24" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph24.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph24.pdf saved as PDF format

.         * RESULT:  No statistically significant lags or leads, but negative impact appears frontloaded 
.         *       to the immediate post-revolutionary period.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  investtogdp
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              -1.066                                                                   
                  (-0.84)                                                                   
alttreat                           -0.855          -0.368           0.291           0.724   
                                  (-0.81)         (-0.42)          (0.20)          (0.48)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              -0.781          -0.821          -1.321+         -1.609*  
                                  (-0.62)         (-0.60)         (-1.89)         (-2.15)   
--------------------------------------------------------------------------------------------
N                     759             759             759             759             759   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Treatment effect turns statistically significant when controlled for additional
.         *       post-revolutionary treatments--not clear what this indicates.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for investtogdp
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              -1.066          -0.212          -0.810          -0.618   
                  (1.271)         (0.763)         (1.004)         (0.768)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.439***                        0.545***
                                 (0.0979)                         (0.110)   
laggeddv2                                           0.131          -0.163*  
                                                 (0.0805)        (0.0570)   
----------------------------------------------------------------------------
N                     759             745             731             731   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR@ processes that do not alter the lack of statistical significance of 
.         *       the treatment variable.
. 
.         
. *=================================================================
. * EFFECT OF SOCIAL AND URBAN CIVIC REVOLUTIONS ON PROPERTY RIGHTS 
. *=================================================================
. * REGRESSION RESULTS WERE PRESENTED IN CHAPTER 9 DO-FILE
. * Will provide graphs, test for  treatment effects, and check treatment effect 
. *   estimation assumptions
. 
. // SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "vdproprts"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. global condvar = "success==1 & leftist==1"

. quietly{

. quietly: chp9matchmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if leftist==1 & success==1 [pweight=freqwt], 
> fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. * Marginsplot for visualizing trends
. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM property rights index") ylabel(.3(.05).6 ,format(%9.2fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "Successful so
> cial" )) note("Graph #25" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(msymb
> ol(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph25.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph25.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0000
                                                Largest FMI       =     0.0000
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       6.55
                                                        avg       =       6.55
Within VCE type:       Robust                           max       =       6.55

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
   vdproprts | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -.0542858   .0769764    -0.71   0.505    -.2389001    .1303284
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0009169   .0061565     0.15   0.886    -.0138485    .0156823
          2  |   .0009169   .0061565     0.15   0.886    -.0138485    .0156823
          3  |   .0425109   .0181012     2.35   0.054    -.0009017    .0859235
          4  |   .0287255    .019223     1.49   0.182    -.0173775    .0748286
          5  |   .0333791   .0181672     1.84   0.112    -.0101917    .0769499
          6  |   .0213471   .0173396     1.23   0.261     -.020239    .0629331
          7  |   .0213868   .0173963     1.23   0.261    -.0203351    .0631087
          8  |   .0220145   .0147422     1.49   0.182    -.0133421    .0573712
          9  |   .0172299   .0164933     1.04   0.333    -.0223264    .0567862
         10  |   .0172299   .0164933     1.04   0.333    -.0223264    .0567862
             |
       _cons |   .3900302   .0361104    10.80   0.000     .3034258    .4766346
------------------------------------------------------------------------------

.         * RESULT:  Negative but not statistically significant (likely due to small number of social revolutions in sample).
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.1698266   p-value = .17896298

.         * RESULT: No statistically significant evidence of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.1934046   p-value = .35190977

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #26" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph26.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph26.pdf saved as PDF format

.         * RESULT:  Consistently negative and statistically insignificant, but grows increasingly negative
.         *       over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdproprts
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat             -0.0543                                                                   
                  (-0.71)                                                                   
alttreat                          -0.0161        -0.00805         -0.0508         -0.0401   
                                  (-1.48)         (-1.48)         (-1.91)         (-1.56)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                             -0.0489         -0.0489        -0.00983         -0.0242   
                                  (-0.64)         (-0.64)         (-0.15)         (-0.36)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence for alternative treatment effects at different times outside revolutionary contention.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdproprts
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat             -0.0543        -0.00561         -0.0253         -0.0202   
                 (0.0770)        (0.0558)        (0.0635)        (0.0501)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.353**                         0.441** 
                                 (0.0829)                         (0.114)   
laggeddv2                                           0.131*         -0.121   
                                                 (0.0437)        (0.0634)   
----------------------------------------------------------------------------
N                     374             374             374             374   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence that AR1  processes are present, but these do not affect the statistical
.         *       significance of treatment.
. 
. 
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. global condvar = "success==1 & urbancivic==1"

. quietly{

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if urbancivic==1 & success==1 [pweight=freqwt
> ], fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM property rights index") ylabel(.5(.1).8 ,format(%9.2fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "Succ urban civ
> ic" )) note("Graph #27" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(msymbol
> (O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph27.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph27.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        946
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.2096
                                                Largest FMI       =     0.0152
                                                Complete DF       =         25
DF adjustment:   Small sample                   DF:     min       =      22.99
                                                        avg       =      23.15
Within VCE type:       Robust                           max       =      23.21

                                (Within VCE adjusted for 26 clusters in revid)
------------------------------------------------------------------------------
   vdproprts | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .0230275   .0239992     0.96   0.347    -.0266194    .0726744
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0004607   .0008969     0.51   0.612    -.0013938    .0023151
          2  |   .0045192   .0048969     0.92   0.366    -.0056056    .0146441
          3  |   .0210911   .0178713     1.18   0.250    -.0158682    .0580505
          4  |   .0593988   .0251361     2.36   0.027     .0074213    .1113764
          5  |   .0605216   .0281395     2.15   0.042     .0023326    .1187107
          6  |   .0837977   .0344752     2.43   0.023     .0125142    .1550812
          7  |   .0834899    .034631     2.41   0.024      .011881    .1550988
          8  |   .0824875   .0345657     2.39   0.026      .011013    .1539621
          9  |   .0871674   .0345522     2.52   0.019     .0157108     .158624
         10  |   .0906053   .0351347     2.58   0.017     .0179269    .1632838
             |
       _cons |     .57863   .0217417    26.61   0.000     .5336767    .6235832
------------------------------------------------------------------------------

.         * RESULT:  Positive but not statistically significant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 4.6959502   p-value = .03996395

.         * RESULT: Evidence of statistically significant violation of the parallel trends assumption.
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.4735409   p-value = .10466916

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #28" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph28.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph28.pdf saved as PDF format

.         * RESULT:  Statistically significant immediately after rev, but then turns insignificant. 
.         *       Consistently positive.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdproprts
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              0.0230                                                                   
                   (0.96)                                                                   
alttreat                         -0.00968+        -0.0192*         0.0189        -0.00373   
                                  (-2.04)         (-2.21)          (0.83)         (-0.16)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              0.0263          0.0358         0.00653          0.0258*  
                                   (1.08)          (1.38)          (0.65)          (2.46)   
--------------------------------------------------------------------------------------------
N                     946             946             946             946             946   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Unclear significance of statistically significant result for Alt, t+2.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdproprts
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              0.0230          0.0128          0.0340          0.0295   
                 (0.0240)        (0.0207)        (0.0238)        (0.0183)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.407***                        0.483***
                                 (0.0810)                        (0.0876)   
laggeddv2                                           0.144*         -0.132** 
                                                 (0.0584)        (0.0409)   
----------------------------------------------------------------------------
N                     946             930             916             914   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1  and AR2 processes that do not alter the lack of statistical significance of the treatment variable
> .
.         
. 
. *==================================
. * EFFECT OF REVOLUTION ON INFLATION
. *==================================
. * REGRESSION RESULTS WERE PRESENTED IN CHAPTER 9 DO-FILE
. * Will provide graphs, test for treatment effects, and check treatment effect 
. *   estimation assumptions
. 
. // IMPACT OF REVOLUTIONARY SUCCESSS/FAILURE ON INFLATION
. use fullsamplediffindifflong.dta, clear  

. quietly: generate anninflatwi = anninflat2   // Must alter variable name due to reshaping of data during multiple imputation

. global yvar = "anninflatwi"

. quietly: label var anninflatwi "Annual inflation (windsorized)"

. quietly{

. quietly: chp9fullmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.success##ib(2).year, fe

. quietly: mimrgns, at(success=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Percent inflation") ylabel(0(10)40 ,format(%9.0fc) angle(0)) legend(pos(6) cols(2) order(1 "Failed" 2 "Successful" )) note("Grap
> h #29" , span) title("`titvar1'" "Avg marginal predictions, all revs") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(msymbol(O) msi
> ze(medlarge))

Variables that uniquely identify margins: success year

. graph export Robustnesstestfiles\Logfiles\robch9graph29.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph29.pdf saved as PDF format

. 
. // SUCCESSFUL SOCIAL VS. SUCCESSFUL URBAN CIVIC
. use simplediffindifflong.dta, clear

. generate anninflatwi = anninflat2 
(120 missing values generated)

. global yvar = "anninflatwi"

. quietly: label var anninflatwi "Annual inflation (windsorized)"

. quietly{

. quietly: chp9simpmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.leftist##ib(2).year if success==1, re

. quietly: mimrgns, at(leftist=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Percent inflation") ylabel(0(10)80 ,format(%9.0fc) angle(0)) legend(pos(6) cols(2) order(1 "Urban civic" 2 "Social" )) note("Gra
> ph #30" , span) title("`titvar1'" "Avg marginal predictions for successful revs") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(msy
> mbol(O) msize(medlarge))

Variables that uniquely identify margins: leftist year

. graph export Robustnesstestfiles\Logfiles\robch9graph30.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph30.pdf saved as PDF format

. 
. // FAILED SOCIAL VS. FAILED URBAN CIVIC
. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.leftist##ib(2).year if success==0, re

. quietly: mimrgns, at(leftist=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Percent inflation") ylabel(0(10)40 ,format(%9.0fc) angle(0)) legend(pos(6) cols(2) order(1 "Urban civic" 2 "Social" )) note("Gra
> ph #31" , span) title("`titvar1'" "Avg marginal predictions for failed revs") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(msymbol
> (O) msize(medlarge))

Variables that uniquely identify margins: leftist year

. graph export Robustnesstestfiles\Logfiles\robch9graph31.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph31.pdf saved as PDF format

. 
. // SUCCESSFUL URBAN CIVIC WITH MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. generate anninflatwi = anninflat2 
(434 missing values generated)

. global yvar = "anninflatwi"

. label var anninflatwi "Annual inflation (windsorized)"

. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. quietly{

. global condvar = "success==1 & urbancivic==1"

. quietly: chp9matchmultimp

. quietly: mi estimate, post dots saving(miest, replace): xtreg $yvar i.revny##ib(2).year if success==1 & urbancivic==1 [pweight=freqwt]
> , cluster(revid) fe

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Percent inflation") ylabel(0(10)50 ,format(%9.0fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "Succ urban civic" )) not
> e("Graph #32" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(msymbol(O) msize(
> medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph32.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph32.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        858
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.2310
                                                Largest FMI       =     0.0989
                                                Complete DF       =         24
DF adjustment:   Small sample                   DF:     min       =      19.98
                                                        avg       =      21.56
Within VCE type:       Robust                           max       =      22.22

                                (Within VCE adjusted for 25 clusters in revid)
------------------------------------------------------------------------------
 anninflatwi | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   3.174687   10.02179     0.32   0.755    -17.68265    24.03203
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |  -.3773689   1.554393    -0.24   0.810    -3.599115    2.844377
          2  |   4.496781   5.058936     0.89   0.384    -5.988731    14.98229
          3  |    10.1502   6.168171     1.65   0.115       -2.667    22.96739
          4  |   18.11392   8.760605     2.07   0.051    -.0724461    36.30028
          5  |   11.10442   7.571551     1.47   0.157    -4.604267     26.8131
          6  |   15.60115   9.068531     1.72   0.100    -3.214813    34.41711
          7  |   14.90976   8.886892     1.68   0.108    -3.522611    33.34214
          8  |   7.602312   9.628911     0.79   0.438    -12.38299    27.58761
          9  |   8.824327   9.202398     0.96   0.348    -10.30532    27.95397
         10  |   5.724142   7.882034     0.73   0.476    -10.71875    22.16704
             |
       _cons |   11.39865   4.339068     2.63   0.015      2.40519    20.39211
------------------------------------------------------------------------------

.         * RESULT:  Positive but not statistically significant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.988855   p-value = .17129023

.         * RESULT: No statistically significant evidence for a violation of the parallel trends assumption.
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.0215772   p-value = .37515599

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #33" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph33.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph33.pdf saved as PDF format

.         * RESULT:  Consistently positive and statistically insignificant.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  anninflatwi
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat               3.175                                                                   
                   (0.32)                                                                   
alttreat                           -6.724          -11.17           11.50          -3.817   
                                  (-1.42)         (-1.36)          (1.28)         (-0.60)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                               5.416           10.62          -6.886           6.037   
                                   (0.52)          (0.82)         (-0.85)          (0.56)   
--------------------------------------------------------------------------------------------
N                     858             858             858             858             858   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence of alternative treatments at play.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for anninflatwi
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat               3.175           6.955           7.173           8.432   
                  (10.02)         (6.605)         (9.108)         (6.721)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.520***                        0.610***
                                 (0.0678)                         (0.122)   
laggeddv2                                           0.145***       -0.181*  
                                                 (0.0291)        (0.0861)   
----------------------------------------------------------------------------
N                     858             843             828             828   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1  and AR2 processes that do not alter the lack of statistical significance of the treatment variable
> .
.         
. *=========================================
. * EFFECT OF REVOLUTION ON GOVERNMENT DEBT
. *=========================================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE
. * Will provide graphs
. 
. // IMPACT OF REVOLUTIONARY SUCCESSS/FAILURE ON GOVERNMENT DEBT
. clear

. use fullsamplediffindifflong.dta, clear

. global yvar = "debttogdp"

. quietly{

. quietly: chp9fullmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.success##ib(2).year, fe

. quietly: mimrgns, at(success=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Debt to GDP, percent") ylabel(40(10)70 ,format(%9.0fc) angle(0)) legend(pos(6) cols(2) order(1 "Failed" 2 "Successful" )) note("
> Graph #34" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(msymbol(O) msize(med
> large))

Variables that uniquely identify margins: success year

. graph export Robustnesstestfiles\Logfiles\robch9graph34.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph34.pdf saved as PDF format

. 
. // SUCCESSFUL SOCIAL VS. SUCCESSFUL URBAN CIVIC
. use simplediffindifflong.dta, clear

. global yvar = "debttogdp"

. quietly{

. quietly: chp9simpmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.leftist##ib(2).year if success==1, fe vce(robust)

. quietly: mimrgns, at(leftist=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Debt to GDP, percent") ylabel(40(10)100 ,format(%9.0fc) angle(0)) legend(pos(6) cols(2) order(1 "Urban civic" 2 "Social" )) note
> ("Graph #35" , span) title("`titvar1'" "Avg marginal predictions for successful revs") plot1opts(msymbol(Oh) msize(medlarge)) plot2opt
> s(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: leftist year

. graph export Robustnesstestfiles\Logfiles\robch9graph35.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph35.pdf saved as PDF format

. 
. // FAILED SOCIAL VS. FAILED URBAN CIVIC
. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.leftist##ib(2).year if success==0, fe vce(robust)

. quietly: mimrgns, at(leftist=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Debt to GDP, percent") ylabel(30(5)50 ,format(%9.0fc) angle(0)) legend(pos(6) cols(2) order(1 "Urban civic" 2 "Social" )) note("
> Graph #36" , span) title("`titvar1'" "Avg marginal predictions for failed revs") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(msym
> bol(O) msize(medlarge))

Variables that uniquely identify margins: leftist year

. graph export Robustnesstestfiles\Logfiles\robch9graph36.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph36.pdf saved as PDF format

. 
. 
. *===========================================================
. * EFFECT OF REVOLUTION ON V-DEM EQUALITY OF RESOURCES INDEX
. *===========================================================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE, AND VISUAL RESULTS  
. *       PRESENTED IN FIGURE 9.8
. * Will test for  treatment effects, and check treatment effect estimation assumptions
. 
. // SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
.  use matcheddiffindifflong.dta, clear

. global yvar = "vdeqdr"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. quietly{

. global condvar = "success==1 & leftist==1"

. quietly: chp9matchmultimp

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0000
                                                Largest FMI       =     0.0000
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       6.55
                                                        avg       =       6.55
Within VCE type:       Robust                           max       =       6.55

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
      vdeqdr | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .1954582    .082434     2.37   0.052    -.0022451    .3931616
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0018488   .0020534     0.90   0.400     -.003076    .0067736
          2  |   .0028948   .0021679     1.34   0.226    -.0023045    .0080941
          3  |  -.0009623    .028201    -0.03   0.974    -.0685973    .0666728
          4  |   .0421254   .0203574     2.07   0.080    -.0066983    .0909491
          5  |   .0458959   .0220717     2.08   0.079    -.0070392     .098831
          6  |   .0496799   .0215776     2.30   0.057    -.0020702      .10143
          7  |   .0542386   .0218146     2.49   0.044     .0019201    .1065571
          8  |   .0594577   .0215256     2.76   0.030     .0078323    .1110832
          9  |   .0598052   .0217658     2.75   0.031     .0076038    .1120067
         10  |   .0613626   .0210369     2.92   0.024     .0109092     .111816
             |
       _cons |   .2159474   .0324602     6.65   0.000     .1380973    .2937974
------------------------------------------------------------------------------

.         * RESULT:  Positive and marginally significant at the .10 level.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.7731905   p-value = .21967856

.         * RESULT: No statistically significant evidence of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.9933121   p-value = .19841403

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #37" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph37.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph37.pdf saved as PDF format

.         * RESULT:  Lags are consistently positive and statistically insignificant.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdeqdr
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat               0.195+                                                                  
                   (2.37)                                                                   
alttreat                         -0.00474        -0.00394          0.0690          0.0314   
                                  (-1.13)         (-1.63)          (1.36)          (1.15)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                               0.197+          0.198+          0.135           0.172+  
                                   (2.39)          (2.40)          (1.74)          (2.21)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Alternative treatment at t+1 turns treatment insignificant--points to critical processes after revolutionary conten
> tion.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdeqdr
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat               0.195+          0.130+          0.173+          0.129+  
                 (0.0824)        (0.0548)        (0.0725)        (0.0551)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.441***                        0.519***
                                 (0.0698)                        (0.0892)   
laggeddv2                                           0.213**       -0.0997*  
                                                 (0.0561)        (0.0411)   
----------------------------------------------------------------------------
N                     374             374             374             374   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes that do not affect the statistical significance of treatment.
. 
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. quietly{

. global condvar = "success==1 & urbancivic==1"

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        946
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.2143
                                                Largest FMI       =     0.0531
                                                Complete DF       =         25
DF adjustment:   Small sample                   DF:     min       =      22.07
                                                        avg       =      22.91
Within VCE type:       Robust                           max       =      23.21

                                (Within VCE adjusted for 26 clusters in revid)
------------------------------------------------------------------------------
      vdeqdr | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .0449247    .016857     2.67   0.014     .0100503    .0797992
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0034319   .0011693     2.94   0.007     .0010143    .0058495
          2  |   .0058083   .0019069     3.05   0.006     .0018656     .009751
          3  |  -.0123101   .0070578    -1.74   0.095    -.0269155    .0022952
          4  |   .0023478    .009949     0.24   0.816    -.0182314    .0229271
          5  |  -.0007613   .0098518    -0.08   0.939    -.0211429    .0196203
          6  |  -.0087407   .0101547    -0.86   0.398    -.0297432    .0122618
          7  |  -.0090711   .0102782    -0.88   0.387    -.0303314    .0121892
          8  |  -.0095451   .0101232    -0.94   0.356     -.030496    .0114058
          9  |  -.0112498   .0104682    -1.07   0.294    -.0329334    .0104338
         10  |  -.0068899   .0106496    -0.65   0.524    -.0289717    .0151919
             |
       _cons |    .496845   .0072093    68.92   0.000      .481939    .5117509
------------------------------------------------------------------------------

.         * RESULT:  Positive and statistically significant at the .05 level.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.5197586   p-value = .22912345

.         * RESULT: No evidence of violation of the parallel trends assumption.
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .78658247   p-value = .46634687

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #38" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph38.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph38.pdf saved as PDF format

.         * RESULT:  Lags are consistently positive, relatively stable, and statistically significant.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdeqdr
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              0.0449*                                                                  
                   (2.67)                                                                   
alttreat                         -0.00247        -0.00524          0.0256          0.0125   
                                  (-1.01)         (-1.25)          (1.70)          (0.83)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              0.0457*         0.0484**        0.0225+         0.0356*  
                                   (2.74)          (2.99)          (2.00)          (2.66)   
--------------------------------------------------------------------------------------------
N                     946             946             946             946             946   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Alt treatment at t+1 turns treatment marginally significant; points to critical 
.         *       processes occurring the year after revolution.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdeqdr
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              0.0449*         0.0431**        0.0501**        0.0438** 
                 (0.0169)        (0.0144)        (0.0163)        (0.0139)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.219***                        0.261***
                                 (0.0460)                        (0.0478)   
laggeddv2                                          0.0807*        -0.0605*  
                                                 (0.0336)        (0.0282)   
----------------------------------------------------------------------------
N                     946             930             916             914   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes that do not alter the statistical significance of the treatment variable.
. 
. 
. *=========================================
. * EFFECT OF REVOLUTION ON HEALTH EQUALITY
. *=========================================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE
. * Will provide graphs, test for treatment effects, and check treatment effect 
. *   estimation assumptions
. 
. // SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "vdhealtheq"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. global condvar = "success==1 & leftist==1"

. quietly{

. quietly: chp9matchmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if leftist==1 & success==1 [pweight=freqwt], 
> fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM health equality index") ylabel(-1.4(.2)0 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "Successful so
> cial" )) note("Graph #39" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(msymb
> ol(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph39.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph39.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0000
                                                Largest FMI       =     0.0000
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       6.55
                                                        avg       =       6.55
Within VCE type:       Robust                           max       =       6.55

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
  vdhealtheq | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |    .930614   .4109911     2.26   0.061    -.0550756    1.916304
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0072684    .007378     0.99   0.360    -.0104264    .0249632
          2  |   .0288266    .015291     1.89   0.104    -.0078461    .0654993
          3  |  -.0934631   .1056376    -0.88   0.408    -.3468161      .15989
          4  |    .147788    .085315     1.73   0.130     -.056825    .3524011
          5  |   .1723262   .0828276     2.08   0.079    -.0263212    .3709736
          6  |   .1840535   .0820667     2.24   0.062     -.012769     .380876
          7  |   .1840535   .0820667     2.24   0.062     -.012769     .380876
          8  |   .2136061   .0917733     2.33   0.055    -.0064959    .4337082
          9  |   .2236605   .0939267     2.38   0.051    -.0016062    .4489271
         10  |    .227542   .0954993     2.38   0.051    -.0014961    .4565801
             |
       _cons |  -1.298761   .1593462    -8.15   0.000    -1.680925   -.9165974
------------------------------------------------------------------------------

.         * RESULT:  Positive and marginally significant at the .10 level.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 3.5343539   p-value = .09690735

.         * RESULT: Statistically significant evidence (at the .10 level) of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.8604973   p-value = .21702116

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #40" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph40.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph40.pdf saved as PDF format

.         * RESULT:  Lags are consistently positive and statistically significant.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdhealtheq
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat               0.931+                                                                  
                   (2.26)                                                                   
alttreat                          -0.0361         -0.0504           0.362           0.163   
                                  (-1.91)         (-1.72)          (1.59)          (1.52)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                               0.943+          0.964+          0.614           0.808+  
                                   (2.29)          (2.36)          (1.76)          (2.11)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Alternative treatment at t+1 turns treatment insignificant--points to critical processes after revolutionary conten
> tion.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdhealtheq
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat               0.931+          0.625+          0.849+          0.626*  
                  (0.411)         (0.270)         (0.369)         (0.260)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.417**                         0.549** 
                                  (0.102)                         (0.120)   
laggeddv2                                           0.146          -0.175** 
                                                 (0.0968)        (0.0382)   
----------------------------------------------------------------------------
N                     374             374             374             374   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and (possibly) AR2 processes that turn treatment even more statistically significant.
. 
. 
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. global condvar = "success==1 & urbancivic==1"

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if urbancivic==1 & success==1 [pweight=freqwt
> ], fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM health equality index") ylabel(-.3(.1).3 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "Succ urban ci
> vic" )) note("Graph #41" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(msymbo
> l(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph41.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph41.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        946
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.2333
                                                Largest FMI       =     0.0292
                                                Complete DF       =         25
DF adjustment:   Small sample                   DF:     min       =      22.67
                                                        avg       =      23.06
Within VCE type:       Robust                           max       =      23.21

                                (Within VCE adjusted for 26 clusters in revid)
------------------------------------------------------------------------------
  vdhealtheq | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .2186875   .1105667     1.98   0.060     -.010011    .4473859
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   -.000353   .0018064    -0.20   0.847    -.0040878    .0033819
          2  |   .0100541   .0061791     1.63   0.117    -.0027219    .0228301
          3  |  -.1042543   .0497285    -2.10   0.047    -.2071238   -.0013849
          4  |  -.0593908   .0714296    -0.83   0.414    -.2071136     .088332
          5  |  -.0750173   .0645047    -1.16   0.257    -.2084434    .0584088
          6  |  -.0971696   .0740666    -1.31   0.202    -.2503346    .0559953
          7  |  -.0821199   .0775161    -1.06   0.300    -.2424308    .0781909
          8  |  -.1025053   .0748018    -1.37   0.184    -.2572302    .0522195
          9  |  -.1072965   .0762166    -1.41   0.173    -.2650004    .0504074
         10  |  -.0980903   .0756924    -1.30   0.208    -.2547993    .0586186
             |
       _cons |  -.0326754   .0458504    -0.71   0.483    -.1274758     .062125
------------------------------------------------------------------------------

.         * RESULT:  Positive and marginally significant at the .10 level.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.2577046   p-value = .14547851

.         * RESULT: No statistically significant evidence for a violation of the parallel trends assumption.
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.1854704   p-value = .32220223

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #42" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph42.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph42.pdf saved as PDF format

.         * RESULT:  Consistently positive, statistically significant from lags 1-5, effect eventually grows insignificant.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdhealtheq
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat               0.219+                                                                  
                   (1.98)                                                                   
alttreat                          -0.0155         -0.0324           0.200*          0.113   
                                  (-1.44)         (-1.52)          (2.31)          (1.27)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                               0.224+          0.240*         0.0433           0.134   
                                   (2.04)          (2.21)          (0.54)          (1.46)   
--------------------------------------------------------------------------------------------
N                     946             946             946             946             946   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Alt treatment at t+1 statistically significant and turns treatment insignificant. Points to
.         *       critical processes in the wake of revolution.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdhealtheq
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat               0.219+          0.197*          0.228+          0.193*  
                  (0.111)        (0.0944)         (0.113)        (0.0926)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.269***                        0.334***
                                 (0.0544)                        (0.0659)   
laggeddv2                                          0.0879*        -0.0939** 
                                                 (0.0315)        (0.0256)   
----------------------------------------------------------------------------
N                     946             930             916             914   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1  and AR2 processes that turn treatment even more statistically significant.
. 
. 
. *==============================================
. * EFFECT OF REVOLUTION ON EDUCATIONAL EQUALITY
. *==============================================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE
. * Will provide graphs, test for treatment effects, and check treatment effect 
. *   estimation assumptions
. 
. // SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "vdeduceq"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. global condvar = "success==1 & leftist==1"

. quietly{

. quietly: chp9matchmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if leftist==1 & success==1 [pweight=freqwt], 
> fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM educational equality index") ylabel(-2(.2)0 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "Successful
>  social" )) note("Graph #43" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(ms
> ymbol(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph43.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph43.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0000
                                                Largest FMI       =     0.0000
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       6.55
                                                        avg       =       6.55
Within VCE type:       Robust                           max       =       6.55

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
    vdeduceq | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .7050399   .4169732     1.69   0.138    -.2949966    1.705076
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0000317   .0196673     0.00   0.999    -.0471368    .0472002
          2  |   .0029658   .0214164     0.14   0.894    -.0483976    .0543292
          3  |   .1968361   .2290684     0.86   0.421     -.352544    .7462161
          4  |   .3869142    .223011     1.73   0.129    -.1479384    .9217667
          5  |   .4014597   .2230908     1.80   0.118    -.1335841    .9365035
          6  |   .4291951   .2210725     1.94   0.096    -.1010083    .9593985
          7  |   .4762078    .219662     2.17   0.070    -.0506128    1.003028
          8  |   .4980796   .2119824     2.35   0.054    -.0103228    1.006482
          9  |   .5086447   .2174679     2.34   0.054    -.0129136    1.030203
         10  |   .5111758   .2166347     2.36   0.053    -.0083842    1.030736
             |
       _cons |  -1.546153   .1839792    -8.40   0.000    -1.987394   -1.104911
------------------------------------------------------------------------------

.         * RESULT:  Positive but statistically insignificant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .01907126   p-value = .89357514

.         * RESULT: No evidence of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .6776087   p-value = .53474214

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #44" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph44.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph44.pdf saved as PDF format

.         * RESULT:  Lags are consistently positive but statistically insignificant.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdeduceq
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat               0.705                                                                   
                   (1.69)                                                                   
alttreat                         -0.00300        -0.00590           0.190          0.0946   
                                  (-0.07)         (-0.25)          (0.98)          (0.80)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                               0.706           0.709           0.539           0.634   
                                   (1.69)          (1.70)          (1.42)          (1.58)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence that alternative treatments at work.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdeduceq
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat               0.705           0.439           0.614           0.441   
                  (0.417)         (0.257)         (0.364)         (0.257)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.460***                        0.562***
                                 (0.0672)                        (0.0646)   
laggeddv2                                           0.202*         -0.136** 
                                                 (0.0726)        (0.0317)   
----------------------------------------------------------------------------
N                     374             374             374             374   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes that do not affect the statistical insignificance of treatment.
. 
.         
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. global condvar = "success==1 & urbancivic==1"

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if urbancivic==1 & success==1 [pweight=freqwt
> ], fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM educational equality index") ylabel(-.3(.1).3 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "Succ urb
> an civic" )) note("Graph #45" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(m
> symbol(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph45.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph45.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        946
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.1683
                                                Largest FMI       =     0.0376
                                                Complete DF       =         25
DF adjustment:   Small sample                   DF:     min       =      22.46
                                                        avg       =      22.94
Within VCE type:       Robust                           max       =      23.21

                                (Within VCE adjusted for 26 clusters in revid)
------------------------------------------------------------------------------
    vdeduceq | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .1250922   .0912051     1.37   0.183     -.063601    .3137853
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0042508   .0063544     0.67   0.510    -.0088875    .0173891
          2  |   .0114077   .0118436     0.96   0.345    -.0130801    .0358955
          3  |  -.0358399   .0327859    -1.09   0.286    -.1037126    .0320328
          4  |   .0410972   .0484447     0.85   0.405    -.0591222    .1413166
          5  |   .0110738   .0511981     0.22   0.831    -.0948655    .1170132
          6  |  -.0225482   .0581089    -0.39   0.702    -.1427326    .0976362
          7  |  -.0390884   .0566655    -0.69   0.497    -.1563091    .0781322
          8  |  -.0388183   .0626803    -0.62   0.542    -.1685193    .0908826
          9  |  -.0343482   .0640558    -0.54   0.597    -.1669689    .0982725
         10  |  -.0118746    .065065    -0.18   0.857    -.1466501    .1229009
             |
       _cons |  -.0072064   .0394942    -0.18   0.857    -.0888647     .074452
------------------------------------------------------------------------------

.         * RESULT:  Positive but statistically insignificant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 4.1477348   p-value = .05241269

.         * RESULT: Marginally significant evidence (at the .10 level) for violation of the parallel trends assumption.
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.2446848   p-value = .1268912

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #46" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph46.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph46.pdf saved as PDF format

.         * RESULT:  Consistently positive; leads 1 and 2 and lags 1-3 statistically significant, but effect becomes 
.         *       insignificant over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdeduceq
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat               0.125                                                                   
                   (1.37)                                                                   
alttreat                          -0.0333+        -0.0617*          0.110          0.0587   
                                  (-1.76)         (-2.11)          (1.50)          (0.68)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                               0.136           0.166+         0.0290          0.0811   
                                   (1.54)          (2.06)          (0.37)          (0.97)   
--------------------------------------------------------------------------------------------
N                     946             946             946             946             946   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Evidence for potential pre-revolutionary "treatments" that turn treatment marginally significant.
.         *       May be due to violation of parallel trends assumption.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdeduceq
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat               0.125           0.115           0.130           0.117   
                 (0.0912)        (0.0695)        (0.0779)        (0.0693)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.229***                        0.249***
                                 (0.0535)                        (0.0482)   
laggeddv2                                          0.0985*        -0.0375   
                                                 (0.0404)        (0.0276)   
----------------------------------------------------------------------------
N                     946             930             916             914   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 processes that do not affect the statistical insignificance of treatment.
. 
. 
. *==========================================
. * EFFECT OF REVOLUTION ON INFANT MORTALITY
. *==========================================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE
. * Will provide graphs, test for treatment effects, and check treatment effect 
. *   estimation assumptions
. 
. // SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "e_peinfmor"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. global condvar = "success==1 & leftist==1"

. quietly{

. quietly: chp9matchmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if leftist==1 & success==1 [pweight=freqwt], 
> fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. * Marginsplot for visualizing trends
. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Infant mortality") ylabel(100(10)150 ,format(%9.0fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "Successful social" )) 
> note("Graph #55" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(msymbol(O) msi
> ze(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph47.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph47.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        275
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.1676
                                                Largest FMI       =     0.0706
                                                Complete DF       =          5
DF adjustment:   Small sample                   DF:     min       =       3.72
                                                        avg       =       3.74
Within VCE type:       Robust                           max       =       3.75

                                 (Within VCE adjusted for 6 clusters in revid)
------------------------------------------------------------------------------
  e_peinfmor | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -4.900846    8.14819    -0.60   0.582    -28.13186    18.33017
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |  -4.659253   1.337338    -3.48   0.028    -8.480407   -.8380995
          2  |  -6.794694    1.09623    -6.20   0.004    -9.930347   -3.659042
          3  |  -8.485338   4.874265    -1.74   0.161    -22.38589    5.415214
          4  |  -12.68605   4.152195    -3.06   0.041     -24.5287   -.8434066
          5  |  -14.79788   4.607913    -3.21   0.036    -27.93931   -1.656464
          6  |   -17.4111    4.89507    -3.56   0.026    -31.37095   -3.451252
          7  |  -20.48335   5.041934    -4.06   0.017    -34.86179   -6.104908
          8  |  -24.02573   5.259302    -4.57   0.012    -39.02372   -9.027744
          9  |   -26.5827   5.714153    -4.65   0.011    -42.87717   -10.28824
         10  |  -27.86814   6.552412    -4.25   0.015    -46.55203   -9.184255
             |
       _cons |   135.8932   2.810885    48.35   0.000     127.8754     143.911
------------------------------------------------------------------------------

.         * RESULT:  Negative but statistically insignificant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .00689644   p-value = .93703807

.         * RESULT: No evidence of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .22123705   p-value = .80897311

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #48" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph48.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph48.pdf saved as PDF format

.         * RESULT:  Lags are consistently negative (and relatively stable) but statistically insignificant.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  e_peinfmor
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              -4.901                                                                   
                  (-0.60)                                                                   
alttreat                            0.562          -0.695           2.327           0.296   
                                   (0.24)         (-0.42)          (0.44)          (0.06)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              -5.088          -4.438          -6.937          -5.123   
                                  (-0.62)         (-0.61)         (-1.24)         (-1.04)   
--------------------------------------------------------------------------------------------
N                     275             275             275             275             275   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence that alternative treatments at work.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for e_peinfmor
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              -4.901          -3.726          -4.659          -3.999   
                  (8.148)         (7.947)         (8.073)         (7.323)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.156*                          0.237+  
                                 (0.0484)                        (0.0855)   
laggeddv2                                          0.0200          -0.101   
                                                 (0.0294)        (0.0628)   
----------------------------------------------------------------------------
N                     275             274             274             273   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 processes that do not affect the statistical insignificance of treatment.
. 
. 
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. global condvar = "success==1 & urbancivic==1"

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if urbancivic==1 & success==1 [pweight=freqwt
> ], fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Infant mortality") ylabel(45(5)65 ,format(%9.0fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "Succ urban civic" )) note
> ("Graph #49" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(msymbol(O) msize(m
> edlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph49.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph49.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        880
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.6291
                                                Largest FMI       =     0.2725
                                                Complete DF       =         24
DF adjustment:   Small sample                   DF:     min       =      15.15
                                                        avg       =      19.53
Within VCE type:       Robust                           max       =      21.45

                                (Within VCE adjusted for 25 clusters in revid)
------------------------------------------------------------------------------
  e_peinfmor | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -.7544526   1.390156    -0.54   0.593    -3.649527    2.140622
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |  -1.738053   .3567453    -4.87   0.000    -2.497774    -.978331
          2  |  -3.524303   .5122145    -6.88   0.000    -4.596274   -2.452331
          3  |  -5.123993   .8264371    -6.20   0.000    -6.861889   -3.386097
          4  |  -6.601409   .9301261    -7.10   0.000    -8.549565   -4.653253
          5  |   -8.27408   1.088472    -7.60   0.000    -10.54657   -6.001595
          6  |  -9.704735   1.220836    -7.95   0.000    -12.24677   -7.162702
          7  |  -11.16091    1.36758    -8.16   0.000       -14.01   -8.311811
          8  |  -12.55946   1.565889    -8.02   0.000    -15.82924   -9.289682
          9  |   -13.8363   1.714014    -8.07   0.000    -17.40295   -10.26965
         10  |  -15.19476   1.868045    -8.13   0.000    -19.08557   -11.30395
             |
       _cons |   62.98589   .9774403    64.44   0.000     60.95578    65.01599
------------------------------------------------------------------------------

.         * RESULT:  Negative but statistically insignificant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .77982074   p-value = .38595621

.         * RESULT: No evidence for violation of the parallel trends assumption.
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .80136963   p-value = .46036013

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #50" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph50.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph50.pdf saved as PDF format

.         * RESULT:  Lags are negative and statistically insignificant, but increase in effect over time.
.         *       Implies the effect might become statistically significant over a longer period of time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  e_peinfmor
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              -0.754                                                                   
                  (-0.54)                                                                   
alttreat                           -0.354          -0.209          -0.540          -0.733   
                                  (-0.57)         (-0.45)         (-0.55)         (-0.73)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              -0.637          -0.615          -0.282          -0.204   
                                  (-0.51)         (-0.54)         (-0.48)         (-0.28)   
--------------------------------------------------------------------------------------------
N                     880             880             880             880             880   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence of alternative treatment effects in proximate years.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for e_peinfmor
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              -0.754          -0.647          -0.792          -0.616   
                  (1.390)         (1.421)         (1.279)         (1.253)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                          0.0120                          0.0710** 
                                 (0.0202)                        (0.0189)   
laggeddv2                                         -0.0447**       -0.0763***
                                                 (0.0138)        (0.0124)   
----------------------------------------------------------------------------
N                     880             864             853             849   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR2 and possibly AR1 processes that do not affect the statistical insignificance of treatment.
. 
. 
. *===================================================
. * EFFECT OF REVOLUTION ON UNDER-FIVE CHILD MORTALITY
. *===================================================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE
. * Will provide graphs, test for treatment effects, and check treatment effect 
. *   estimation assumptions
. 
. // SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "under5mort"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. global condvar = "success==1 & leftist==1"

. quietly{

. quietly: chp9matchmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if leftist==1 & success==1 [pweight=freqwt], 
> fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Under-5 child mortality") ylabel(180(10)270 ,format(%9.0fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "Successful soci
> al" )) note("Graph #51" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(msymbol
> (O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph51.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph51.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0000
                                                Largest FMI       =     0.0000
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       6.55
                                                        avg       =       6.55
Within VCE type:       Robust                           max       =       6.55

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
  under5mort | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -5.218029   11.36095    -0.46   0.661    -32.46526     22.0292
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |  -6.778224    .943622    -7.18   0.000    -9.041334   -4.515113
          2  |  -11.77447    1.38159    -8.52   0.000    -15.08797   -8.460973
          3  |  -33.28479     13.706    -2.43   0.048    -66.15621   -.4133672
          4  |  -37.62123   13.42611    -2.80   0.028    -69.82137   -5.421091
          5  |  -41.79375   13.24997    -3.15   0.018    -73.57146   -10.01605
          6  |  -45.76915   13.11244    -3.49   0.011    -77.21701   -14.32129
          7  |  -50.67719    12.8435    -3.95   0.006    -81.48007   -19.87432
          8  |  -54.86002    12.8427    -4.27   0.004    -85.66098   -24.05907
          9  |  -57.99564   13.04758    -4.44   0.004    -89.28796   -26.70332
         10  |  -62.63481   12.83376    -4.88   0.002    -93.41432   -31.85529
             |
       _cons |   256.1364   8.310258    30.82   0.000     236.2057    276.0671
------------------------------------------------------------------------------

.         * RESULT:  Negative but statistically insignificant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .1121399   p-value = .74633222

.         * RESULT: No evidence of violation of parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .08731364   p-value = .91725082

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #52" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph52.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph52.pdf saved as PDF format

.         * RESULT:  Lags are consistently negative (and relatively stable) but statistically insignificant.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  under5mort
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              -5.218                                                                   
                  (-0.46)                                                                   
alttreat                            1.367           1.082          -0.627          -0.935   
                                   (0.37)          (0.29)         (-0.10)         (-0.15)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              -5.674          -5.940          -4.670          -4.517   
                                  (-0.54)         (-0.63)         (-0.48)         (-0.45)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence that alternative treatments at work.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for under5mort
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              -5.218          -4.700          -6.234          -5.681   
                  (11.36)         (11.63)         (9.567)         (8.697)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                          0.0675                           0.187+  
                                 (0.0626)                        (0.0916)   
laggeddv2                                         -0.0956*         -0.179*  
                                                 (0.0354)        (0.0635)   
----------------------------------------------------------------------------
N                     374             374             374             374   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR2 processes that do not affect the statistical insignificance of treatment.
. 
. 
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. global condvar = "success==1 & urbancivic==1"

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if urbancivic==1 & success==1 [pweight=freqwt
> ], fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. * Marginsplot for visualizing trends
. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("Under-5 child mortality") ylabel(65(5)105 ,format(%9.0fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "Succ urban civic"
>  )) note("Graph #53" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) plot2opts(msymbol(O)
>  msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph53.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph53.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        858
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.3267
                                                Largest FMI       =     0.0385
                                                Complete DF       =         23
DF adjustment:   Small sample                   DF:     min       =      20.55
                                                        avg       =      20.95
Within VCE type:       Robust                           max       =      21.23

                                (Within VCE adjusted for 24 clusters in revid)
------------------------------------------------------------------------------
  under5mort | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   -1.72269   2.003728    -0.86   0.400    -5.895241    2.449861
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |  -3.247809   .4561174    -7.12   0.000     -4.19573   -2.299888
          2  |  -6.475599   .8380683    -7.73   0.000    -8.217305   -4.733894
          3  |  -8.783764   1.325246    -6.63   0.000    -11.54096   -6.026568
          4  |  -11.44297   1.598505    -7.16   0.000     -14.7675   -8.118438
          5  |  -13.96595   1.883575    -7.41   0.000    -17.88253   -10.04937
          6  |  -16.31851   2.153686    -7.58   0.000    -20.79618   -11.84084
          7  |  -18.48261   2.506492    -7.37   0.000    -23.69671   -13.26851
          8  |  -20.95751   2.726629    -7.69   0.000    -26.63097   -15.28405
          9  |  -22.93471   3.077187    -7.45   0.000    -29.34031   -16.52912
         10  |  -25.73887   3.220327    -7.99   0.000    -32.43845   -19.03928
             |
       _cons |   98.61827   1.801069    54.76   0.000     94.87522    102.3613
------------------------------------------------------------------------------

.         * RESULT:  Negative but statistically insignificant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.2589667   p-value = .27342443

.         * RESULT: No evidence for violation of the parallel trends assumption.
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.0572067   p-value = .36370995

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #54" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph54.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph54.pdf saved as PDF format

.         * RESULT:  Lags are negative and statistically insignificant, but increase in effect over time.
.         *       Implies the effect might become statistically significant over a longer period of time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  under5mort
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              -1.723                                                                   
                  (-0.86)                                                                   
alttreat                           -0.814          -0.559          -1.321          -1.342   
                                  (-1.25)         (-0.95)         (-0.93)         (-0.93)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              -1.451          -1.350          -0.567          -0.716   
                                  (-0.79)         (-0.81)         (-0.68)         (-0.70)   
--------------------------------------------------------------------------------------------
N                     858             858             858             858             858   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence of alternative treatment effects in proximate years.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for under5mort
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              -1.723          -1.371          -1.928          -1.410   
                  (2.004)         (2.170)         (1.981)         (1.911)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                          0.0346                          0.0904** 
                                 (0.0238)                        (0.0277)   
laggeddv2                                         -0.0273*        -0.0706***
                                                 (0.0114)        (0.0138)   
----------------------------------------------------------------------------
N                     858             845             834             832   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR2 and possibly AR1 processes that do not affect the statistical insignificance of treatment.
. 
. 
. *====================================================================
. * EFFECT OF REVOLUTION ON INCOME INEQUALITY (GINI INDEX)--FIGURE 9.10
. *====================================================================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE, AND GRAPH
. *       PROVIDED IN FIGURE 9.10 IN BOOK
. *       INSUFFICIENT DATA AVAILABLE FOR MATCHED SAMPLES
. *       NO ADDITIONAL ROBUSTNESS TESTS CARRIED OUT
. 
. 
. *==========================================================
. * EFFECT OF REVOLUTION ON STATE/PRIVATE PROPERTY OWNERSHIP
. *==========================================================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE
. * Graphs of results produced here
. 
. * SUCCESSFUL SOCIAL VS. SUCCESSFUL URBAN CIVIC
. use simplediffindifflong.dta, clear

. global yvar = "vdstown_ord"

. label var vdstown_ord "Private owndership of the economy (0-4)"

. quietly{

. global condvar = "leftist==1"

. quietly: chp9simpmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.leftist##ib(2).year if success==1, fe vce(robust)

. quietly: mimrgns, at(leftist=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM State/Property Index") ylabel(.5(.5)3.5 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Urban civic" 2 "Social" ))
>  note("Graph #55" , span) title("`titvar1'" "Avg marginal predictions for successful episodes") plot1opts(msymbol(Oh) msize(medlarge))
>  plot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: leftist year

. graph export Robustnesstestfiles\Logfiles\robch9graph55.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph55.pdf saved as PDF format

. 
. * SUCCESSFUL URBAN CIVIC VS. FAILED URBAN CIVIC
. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.success##ib(2).year if leftist==0, fe vce(robust)

. quietly: mimrgns, at(success=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM State/Property Index") ylabel(1(.5)3 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Failed urban civic" 2 "Succes
> sful urban civic" )) note("Graph #56" , span) title("`titvar1'" "Avg marginal predictions for urban civic episodes") plot1opts(msymbol
> (Oh) msize(medlarge)) plot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: success year

. graph export Robustnesstestfiles\Logfiles\robch9graph56.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph56.pdf saved as PDF format

. 
. * SUCCESSFUL SOCIAL VS. FAILED SOCIAL
. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.success##ib(2).year if leftist==1, fe vce(robust)

. quietly: mimrgns, at(success=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM State/Property Index") ylabel(1(.5)3 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Failed social" 2 "Successful 
> social" )) note("Graph #57" , span) title("`titvar1'" "Avg marginal predictions for urban civic episodes") plot1opts(msymbol(Oh) msize
> (medlarge)) plot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: success year

. graph export Robustnesstestfiles\Logfiles\robch9graph57.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph57.pdf saved as PDF format

. 
. * URBAN CIVIC, EXCLUDING CASES OF POSTCOMMUNIST TRANSITIONS
. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.success##ib(2).year if leftist==0 & incgovcommunist==0, fe vce(
> robust)

. quietly: mimrgns, at(success=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM State/Property Index") ylabel(1.5(.5)3 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Failed urban civic" 2 "Succ
> essful urban civic" )) note("Graph #58" , span) title("`titvar1'" "Avg marginal predictions for urban civic (no post-comm)") plot1opts
> (msymbol(Oh) msize(medlarge)) plot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: success year

. graph export Robustnesstestfiles\Logfiles\robch9graph58.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph58.pdf saved as PDF format

. 
. 
. *==========================================
. * EFFECT OF REVOLUTION ON GENDER INEQUALITY
. *==========================================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE
. * Will provide graphs, test for treatment effects, and check treatment effect 
. *   estimation assumptions
. 
. 
. *=====================================
. * WOMEN'S POLITICAL EMPOWERMENT INDEX
. *=====================================
. 
. // SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "v2x_gender"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. global condvar = "success==1 & leftist==1"

. quietly{

. quietly: chp9matchmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if leftist==1 & success==1 [pweight=freqwt], 
> fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM Women's Political Empowerment Index") ylabel(.2(.1).5 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "
> Successful social" )) note("Graph #59" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) pl
> ot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph59.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph59.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.1186
                                                Largest FMI       =     0.0420
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       6.50
                                                        avg       =       6.54
Within VCE type:       Robust                           max       =       6.55

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
  v2x_gender | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .0417181   .0659091     0.63   0.548    -.1163535    .1997897
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0014205   .0027266     0.52   0.620    -.0051189    .0079598
          2  |   .0008192   .0024172     0.34   0.745    -.0049873    .0066256
          3  |   .0344667   .0357136     0.97   0.369    -.0511861    .1201195
          4  |    .047601   .0296183     1.61   0.155    -.0234334    .1186353
          5  |   .0608825   .0289859     2.10   0.077    -.0086351    .1304001
          6  |   .0577891   .0280007     2.06   0.081    -.0093657    .1249439
          7  |   .0561062   .0283923     1.98   0.092    -.0119878    .1242003
          8  |    .058261   .0278966     2.09   0.078    -.0086442    .1251661
          9  |   .0643716   .0295984     2.17   0.069    -.0066149    .1353582
         10  |   .0676399   .0293412     2.31   0.057      -.00273    .1380098
             |
       _cons |   .3086745   .0369999     8.34   0.000     .2199368    .3974122
------------------------------------------------------------------------------

.         * RESULT:  Positive but statistically insignificant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 4.2430649   p-value = .0733748

.         * RESULT: Marginally significant evidence (at the .10 level) of violation of the parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.209219   p-value = .17222336

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #60" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph60.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph60.pdf saved as PDF format

.         * RESULT:  Lags are consistently positive (and relatively stable) but statistically insignificant.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  v2x_gender
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              0.0417                                                                   
                   (0.63)                                                                   
alttreat                         -0.00849+       -0.00363          0.0196          0.0148   
                                  (-2.08)         (-1.50)          (0.42)          (0.46)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              0.0445          0.0441          0.0246          0.0306   
                                   (0.68)          (0.66)          (0.49)          (0.55)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence that alternative treatments at work.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for v2x_gender
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              0.0417          0.0321          0.0411          0.0300   
                 (0.0659)        (0.0412)        (0.0575)        (0.0425)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.413***                        0.533***
                                 (0.0604)                        (0.0717)   
laggeddv2                                           0.145          -0.162   
                                                  (0.103)        (0.0872)   
----------------------------------------------------------------------------
N                     374             373             373             372   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 processes that do not affect the statistical insignificance of treatment.
. 
. 
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. global condvar = "success==1 & urbancivic==1"

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if urbancivic==1 & success==1 [pweight=freqwt
> ], fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM Women's Political Empowerment Index") ylabel(.5(.05).7 , format(%9.2fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2
>  "Succ urban civic" )) note("Graph #61" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) p
> lot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph61.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph61.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        924
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.1360
                                                Largest FMI       =     0.0533
                                                Complete DF       =         25
DF adjustment:   Small sample                   DF:     min       =      22.07
                                                        avg       =      22.83
Within VCE type:       Robust                           max       =      23.21

                                (Within VCE adjusted for 26 clusters in revid)
------------------------------------------------------------------------------
  v2x_gender | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .0506443   .0208588     2.43   0.024      .007463    .0938256
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |    .003604   .0025239     1.43   0.167    -.0016145    .0088225
          2  |    .011143   .0044465     2.51   0.020     .0019495    .0203365
          3  |   .0195628    .013442     1.46   0.159      -.00825    .0473757
          4  |   .0583258   .0122193     4.77   0.000     .0330387    .0836129
          5  |   .0588466   .0117172     5.02   0.000      .034601    .0830923
          6  |    .064366   .0131961     4.88   0.000     .0370677    .0916643
          7  |   .0675793   .0129375     5.22   0.000     .0408144    .0943441
          8  |   .0674425   .0133701     5.04   0.000     .0397639    .0951212
          9  |    .078292   .0155079     5.05   0.000     .0461363    .1104477
         10  |   .0857723   .0176702     4.85   0.000     .0491508    .1223938
             |
       _cons |   .5574866   .0092749    60.11   0.000     .5383098    .5766634
------------------------------------------------------------------------------

.         * RESULT:  Positive and statistically significant at the .05 level.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .01417606   p-value = .90617681

.         * RESULT: No evidence for violation of the parallel trends assumption.
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .07853139   p-value = .92470017

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #62" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph62.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph62.pdf saved as PDF format

.         * RESULT:  Lags are positive and mostly statistically significant, and relatively stable over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  v2x_gender
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              0.0506*                                                                  
                   (2.43)                                                                   
alttreat                        -0.000418         0.00140          0.0524**        0.0250+  
                                  (-0.11)          (0.25)          (3.06)          (1.96)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              0.0508*         0.0497*        0.00476          0.0319+  
                                   (2.40)          (2.16)          (0.33)          (2.02)   
--------------------------------------------------------------------------------------------
N                     924             924             924             924             924   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Alternative treatment effects at t+1 and t+2 turn treatment effect statistically insignificant.
.         *       Implies processes after revolution that influence the nature of the effect.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for v2x_gender
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              0.0506*         0.0371*         0.0549**        0.0459** 
                 (0.0209)        (0.0161)        (0.0178)        (0.0147)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.332***                        0.376***
                                 (0.0555)                        (0.0487)   
laggeddv2                                           0.137**       -0.0780*  
                                                 (0.0478)        (0.0281)   
----------------------------------------------------------------------------
N                     924             908             894             892   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes that do not affect the statistical significance of treatment.
. 
. 
. *=========================
. * WOMEN'S CIVIL LIBERTIES
. *=========================
. 
. // SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "v2x_gencl"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. global condvar = "success==1 & leftist==1"

. quietly{

. quietly: chp9matchmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if leftist==1 & success==1 [pweight=freqwt], 
> fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM Women's Civil Liberties Index") ylabel(.2(.1).5 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "Succes
> sful social" )) note("Graph #63" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) plot2opt
> s(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph63.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph63.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0000
                                                Largest FMI       =     0.0000
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       6.55
                                                        avg       =       6.55
Within VCE type:       Robust                           max       =       6.55

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
   v2x_gencl | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -.0235326   .0820006    -0.29   0.783    -.2201966    .1731314
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |  -.0000481   .0050112    -0.01   0.993    -.0120665    .0119703
          2  |  -.0001108    .005271    -0.02   0.984    -.0127524    .0125307
          3  |   .0565313   .0334082     1.69   0.137    -.0235925    .1366551
          4  |    .053609   .0321026     1.67   0.142    -.0233834    .1306015
          5  |   .0587059   .0332583     1.77   0.124    -.0210583    .1384701
          6  |   .0521115   .0334946     1.56   0.167    -.0282194    .1324424
          7  |    .051702   .0335529     1.54   0.170    -.0287686    .1321726
          8  |    .052807   .0325299     1.62   0.152    -.0252101    .1308242
          9  |   .0439722   .0315994     1.39   0.210    -.0318133    .1197578
         10  |   .0433239   .0316764     1.37   0.217    -.0326463    .1192941
             |
       _cons |   .3281135   .0460573     7.12   0.000     .2176531     .438574
------------------------------------------------------------------------------

.         * RESULT:  Negative but statistically insignificant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.8419293   p-value = .21177227

.         * RESULT: No evidence of violation of the parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.4763151   p-value = .28463366

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #64" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph64.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph64.pdf saved as PDF format

.         * RESULT:  Lags are statistically insignificant but grow increasingly negative over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  v2x_gencl
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat             -0.0235                                                                   
                  (-0.29)                                                                   
alttreat                          -0.0132        -0.00610         -0.0392         -0.0319   
                                  (-1.46)         (-1.16)         (-0.79)         (-1.08)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                             -0.0191         -0.0195          0.0108        0.000392   
                                  (-0.24)         (-0.24)          (0.20)          (0.01)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence that alternative treatments at work.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for v2x_gencl
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat             -0.0235          0.0129       -0.000484        -0.00115   
                 (0.0820)        (0.0503)        (0.0654)        (0.0474)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.434***                        0.556***
                                 (0.0515)                        (0.0823)   
laggeddv2                                           0.160*         -0.168+  
                                                 (0.0603)        (0.0715)   
----------------------------------------------------------------------------
N                     374             374             374             374   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes that do not affect the statistical insignificance of treatment.
. 
. 
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. global condvar = "success==1 & urbancivic==1"

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if urbancivic==1 & success==1 [pweight=freqwt
> ], fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM Women's Civil Liberties Index") ylabel(.5(.05).7 , format(%9.2fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "Succ
>  urban civic" )) note("Graph #65" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) plot2op
> ts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph65.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph65.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        946
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.1544
                                                Largest FMI       =     0.0169
                                                Complete DF       =         25
DF adjustment:   Small sample                   DF:     min       =      22.95
                                                        avg       =      23.12
Within VCE type:       Robust                           max       =      23.21

                                (Within VCE adjusted for 26 clusters in revid)
------------------------------------------------------------------------------
   v2x_gencl | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .0689313   .0238606     2.89   0.008     .0195726    .1182901
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |  -.0027654   .0020021    -1.38   0.180     -.006905    .0013743
          2  |   .0033181   .0034806     0.95   0.350    -.0038785    .0105146
          3  |   .0137472   .0135921     1.01   0.322    -.0143666    .0418609
          4  |    .051314   .0194214     2.64   0.015     .0111509     .091477
          5  |   .0459972   .0202933     2.27   0.033      .004029    .0879653
          6  |   .0594635   .0261132     2.28   0.032     .0054686    .1134583
          7  |   .0642865   .0265189     2.42   0.024     .0094491    .1191239
          8  |   .0662237   .0269131     2.46   0.022     .0105657    .1218818
          9  |   .0733271    .027954     2.62   0.015     .0155021    .1311522
         10  |   .0705859   .0293824     2.40   0.025     .0097971    .1313747
             |
       _cons |   .5387864   .0193166    27.89   0.000     .4988473    .5787255
------------------------------------------------------------------------------

.         * RESULT:  Positive and statistically significant at the .01 level.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.1559784   p-value = .15448666

.         * RESULT: No evidence for violation of the parallel trends assumption.
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.8946588   p-value = .1713397

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #66" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph66.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph66.pdf saved as PDF format

.         * RESULT:  Lags are consistently positive and statistically significant, but deteriorate over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  v2x_gencl
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              0.0689**                                                                 
                   (2.89)                                                                   
alttreat                         -0.00520        -0.00700+         0.0271        -0.00195   
                                  (-1.16)         (-1.73)          (1.25)         (-0.11)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              0.0707**        0.0736**        0.0452*         0.0704***
                                   (2.95)          (3.01)          (2.73)          (4.29)   
--------------------------------------------------------------------------------------------
N                     946             946             946             946             946   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No alternative treatment effects that affect the statistical significance of treatment.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for v2x_gencl
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              0.0689**        0.0448*         0.0758**        0.0598** 
                 (0.0239)        (0.0209)        (0.0246)        (0.0192)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.365***                        0.442***
                                 (0.0917)                        (0.0872)   
laggeddv2                                           0.121          -0.128** 
                                                 (0.0715)        (0.0340)   
----------------------------------------------------------------------------
N                     946             930             916             914   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and (possibly) AR2 processes that do not affect the statistical significance of treatment.
. 
. 
. *========================================
. * WOMEN'S PARTICIPATION IN CIVIL SOCIETY
. *========================================
. 
. // SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "v2x_gencs"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. global condvar = "success==1 & leftist==1"

. quietly{

. quietly: chp9matchmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if leftist==1 & success==1 [pweight=freqwt], 
> fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. * Marginsplot for visualizing trends
. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM Women's Part in Civil Society Index") ylabel(.2(.1).5 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2 "
> Successful social" )) note("Graph #67" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) pl
> ot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph67.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph67.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0000
                                                Largest FMI       =     0.0000
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       6.55
                                                        avg       =       6.55
Within VCE type:       Robust                           max       =       6.55

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
   v2x_gencs | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .0913928   .0772395     1.18   0.278    -.0938525    .2766381
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0016405   .0011426     1.44   0.197    -.0010998    .0043807
          2  |   .0024054   .0026225     0.92   0.392    -.0038843     .008695
          3  |   .0178948   .0379557     0.47   0.653    -.0731352    .1089248
          4  |   .0456013   .0266705     1.71   0.134    -.0183632    .1095658
          5  |   .0528402   .0246345     2.14   0.072    -.0062412    .1119216
          6  |   .0548686   .0240724     2.28   0.059    -.0028649    .1126022
          7  |   .0568267   .0238729     2.38   0.051    -.0004283    .1140818
          8  |   .0538531   .0239602     2.25   0.062    -.0036113    .1113175
          9  |   .0538288   .0254603     2.11   0.075    -.0072333    .1148909
         10  |   .0529723   .0254022     2.09   0.078    -.0079503     .113895
             |
       _cons |   .2865672   .0367115     7.81   0.000     .1985211    .3746133
------------------------------------------------------------------------------

.         * RESULT:  Positive but statistically insignificant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 3.4047427   p-value = .10222765

.         * RESULT: No evidence of violation of the parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.4292716   p-value = .14982796

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #68" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph68.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph68.pdf saved as PDF format

.         * RESULT:  Lags are statistically insignificant, positive, and relatively stable.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  v2x_gencs
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              0.0914                                                                   
                   (1.18)                                                                   
alttreat                         -0.00391+       -0.00359          0.0483          0.0341   
                                  (-2.18)         (-1.21)          (0.85)          (1.06)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              0.0927          0.0938          0.0491          0.0658   
                                   (1.20)          (1.20)          (0.91)          (1.04)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence that alternative treatments at work.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for v2x_gencs
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              0.0914          0.0625          0.0823          0.0636   
                 (0.0772)        (0.0523)        (0.0706)        (0.0545)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.359**                         0.457***
                                 (0.0739)                        (0.0528)   
laggeddv2                                           0.130          -0.128+  
                                                  (0.104)        (0.0662)   
----------------------------------------------------------------------------
N                     374             374             374             374   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 processes that do not affect the statistical insignificance of treatment.
. 
. 
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. global condvar = "success==1 & urbancivic==1"

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if urbancivic==1 & success==1 [pweight=freqwt
> ], fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM Women's Part in Civil Society Index") ylabel(.5(.05).7 , format(%9.2fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2
>  "Succ urban civic" )) note("Graph #69" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) p
> lot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph69.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph69.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        946
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.1118
                                                Largest FMI       =     0.0293
                                                Complete DF       =         25
DF adjustment:   Small sample                   DF:     min       =      22.66
                                                        avg       =      23.04
Within VCE type:       Robust                           max       =      23.21

                                (Within VCE adjusted for 26 clusters in revid)
------------------------------------------------------------------------------
   v2x_gencs | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .0782993   .0230697     3.39   0.002     .0305712    .1260273
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0057367    .002698     2.13   0.044     .0001584     .011315
          2  |   .0100879   .0045983     2.19   0.039     .0005804    .0195954
          3  |   .0172918   .0134021     1.29   0.210    -.0104307    .0450143
          4  |   .0582226   .0166456     3.50   0.002     .0237962     .092649
          5  |   .0605825   .0170524     3.55   0.002     .0253124    .0958526
          6  |   .0574704    .018915     3.04   0.006     .0183568    .0965841
          7  |   .0589959   .0186333     3.17   0.004     .0204579    .0975338
          8  |   .0560327   .0189057     2.96   0.007     .0169271    .0951383
          9  |   .0623333   .0193401     3.22   0.004     .0223029    .1023636
         10  |   .0692138    .020398     3.39   0.003     .0269826    .1114449
             |
       _cons |   .5242552   .0143653    36.49   0.000     .4945534     .553957
------------------------------------------------------------------------------

.         * RESULT:  Positive and statistically significant at the .01 level.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .05261924   p-value = .82043306

.         * RESULT: No evidence for violation of the parallel trends assumption.
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .03859832   p-value = .96219433

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #70" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph70.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph70.pdf saved as PDF format

.         * RESULT:  Lags are consistently positive and statistically significant, and relatively stable over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  v2x_gencs
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              0.0783**                                                                 
                   (3.39)                                                                   
alttreat                         -0.00101        -0.00144          0.0502*         0.0265+  
                                  (-0.17)         (-0.27)          (2.36)          (1.87)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              0.0786**        0.0793**        0.0344+         0.0585** 
                                   (3.37)          (3.34)          (1.96)          (3.30)   
--------------------------------------------------------------------------------------------
N                     946             946             946             946             946   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Critical processes appear to take place at t+1 that turn treatment marginally significant. 
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for v2x_gencs
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              0.0783**        0.0501*         0.0746**        0.0602** 
                 (0.0231)        (0.0202)        (0.0229)        (0.0196)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.300***                        0.355***
                                 (0.0593)                        (0.0515)   
laggeddv2                                           0.108*        -0.0880*  
                                                 (0.0484)        (0.0321)   
----------------------------------------------------------------------------
N                     946             930             916             914   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes that do not affect the statistical significance of treatment.
. 
. 
. *==================================
. * WOMEN'S POLITICAL PARTICIPATION
. *==================================
. 
. // SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "v2x_genpp"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. global condvar = "success==1 & leftist==1"

. quietly{

. quietly: chp9matchmultimp

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if leftist==1 & success==1 [pweight=freqwt], 
> fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM Women's Political Participation Index") ylabel(.2(.1).5 ,format(%9.1fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched" 2
>  "Successful social" )) note("Graph #71" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge)) 
> plot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph71.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph71.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.1186
                                                Largest FMI       =     0.0429
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       6.49
                                                        avg       =       6.54
Within VCE type:       Robust                           max       =       6.55

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
   v2x_genpp | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .0628389   .0766177     0.82   0.441    -.1209154    .2465932
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0027883   .0031883     0.87   0.413    -.0048582    .0104347
          2  |   .0024863   .0039803     0.62   0.554    -.0070765    .0120491
          3  |   .0266284   .0440571     0.60   0.566    -.0790349    .1322916
          4  |   .0440129   .0338355     1.30   0.237    -.0371358    .1251615
          5  |   .0740141   .0271388     2.73   0.031     .0089261    .1391021
          6  |   .0691256   .0271188     2.55   0.040     .0040857    .1341655
          7  |   .0660563   .0275515     2.40   0.050    -.0000213    .1321338
          8  |   .0818689   .0266772     3.07   0.020      .017888    .1458499
          9  |    .101509   .0325702     3.12   0.018      .023395     .179623
         10  |   .1151052   .0362821     3.17   0.017     .0280889    .2021216
             |
       _cons |   .2878932   .0340271     8.46   0.000     .2062852    .3695011
------------------------------------------------------------------------------

.         * RESULT:  Positive but statistically insignificant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.4173259   p-value = .26796918

.         * RESULT: No evidence of violation of the parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.6372081   p-value = .25350334

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #72" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph72.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph72.pdf saved as PDF format

.         * RESULT:  Lags are statistically insignificant, positive, and relatively stable.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  v2x_genpp
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              0.0628                                                                   
                   (0.82)                                                                   
alttreat                         -0.00904        -0.00442          0.0688          0.0507   
                                  (-1.36)         (-0.91)          (1.00)          (0.89)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              0.0659          0.0658         0.00267          0.0248   
                                   (0.86)          (0.86)          (0.03)          (0.35)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No evidence that alternative treatments at work.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for v2x_genpp
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              0.0628          0.0321          0.0435          0.0338   
                 (0.0766)        (0.0443)        (0.0596)        (0.0461)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.382***                        0.417** 
                                 (0.0479)                        (0.0757)   
laggeddv2                                           0.193*        -0.0471   
                                                 (0.0764)        (0.0864)   
----------------------------------------------------------------------------
N                     374             373             373             372   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 processes that do not affect the statistical insignificance of treatment.
. 
. 
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. global condvar = "success==1 & urbancivic==1"

. quietly: mi estimate, post dots saving(miest, replace):  xtreg $yvar i.revny##ib(2).year if urbancivic==1 & success==1 [pweight=freqwt
> ], fe cluster(revid)

. quietly: mimrgns, at(revny=(0 1) year=(0 1 2 3 4 5 6 7 8 9 10)) predict(xb) noatlegend noestimcheck cmdmargins

. * Marginsplot for visualizing trends
. marginsplot, xdimension(year) noci xlabel(0 "t-3" 1 "t-2" 2 "t-1" 3 "Rev" 4 "t+1" 5 "t+2" 6 "t+3" 7 "t+4" 8 "t+5" 9 "t+6" 10 "t+7") yt
> itle("VDEM Women's Political Participation Index") ylabel(.5(.05).7 , format(%9.2fc) angle(0)) legend(pos(6) cols(2) order(1 "Matched"
>  2 "Succ urban civic" )) note("Graph #73" , span) title("`titvar1'" "Avg marginal predictions") plot1opts(msymbol(Oh) msize(medlarge))
>  plot2opts(msymbol(O) msize(medlarge))

Variables that uniquely identify margins: revny year

. graph export Robustnesstestfiles\Logfiles\robch9graph73.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph73.pdf saved as PDF format

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        924
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.1133
                                                Largest FMI       =     0.0336
                                                Complete DF       =         25
DF adjustment:   Small sample                   DF:     min       =      22.56
                                                        avg       =      22.96
Within VCE type:       Robust                           max       =      23.21

                                (Within VCE adjusted for 26 clusters in revid)
------------------------------------------------------------------------------
   v2x_genpp | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .0135946   .0296504     0.46   0.651    -.0478081    .0749973
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0042005   .0035668     1.18   0.251    -.0031742    .0115752
          2  |   .0136824    .007765     1.76   0.091    -.0023724    .0297373
          3  |   .0147882   .0226546     0.65   0.520    -.0320828    .0616591
          4  |   .0577976   .0218298     2.65   0.014     .0126307    .1029645
          5  |   .0641634    .024212     2.65   0.014     .0140844    .1142425
          6  |   .0684892   .0226468     3.02   0.006     .0216456    .1153328
          7  |   .0699641   .0258275     2.71   0.012     .0165499    .1233782
          8  |   .0630755   .0252814     2.49   0.020     .0107611      .11539
          9  |   .0869757   .0292722     2.97   0.007     .0263608    .1475907
         10  |   .1021292   .0313408     3.26   0.003     .0372586    .1669998
             |
       _cons |   .6267899   .0118215    53.02   0.000     .6023477    .6512321
------------------------------------------------------------------------------

.         * RESULT:  Positive but statistically insignificant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .31698071   p-value = .57844267

.         * RESULT: No evidence for violation of the parallel trends assumption.
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .18238929   p-value = .83437573

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #74" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph74.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph74.pdf saved as PDF format

.         * RESULT:  Lags are statistically insignificant and generally growing more positive over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  v2x_genpp
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat              0.0136                                                                   
                   (0.46)                                                                   
alttreat                          0.00376         0.00526          0.0882**        0.0556*  
                                   (0.59)          (0.47)          (2.90)          (2.83)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                              0.0123          0.0101         -0.0636         -0.0281   
                                   (0.40)          (0.30)         (-1.64)         (-0.86)   
--------------------------------------------------------------------------------------------
N                     924             924             924             924             924   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Alternative treatments at t+1 and t+2, but have no effect on the statistical insignificance of treatment.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for v2x_genpp
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat              0.0136          0.0175          0.0217          0.0221   
                 (0.0297)        (0.0205)        (0.0252)        (0.0187)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.347***                        0.364***
                                 (0.0518)                        (0.0699)   
laggeddv2                                          0.0912*        -0.0858+  
                                                 (0.0358)        (0.0422)   
----------------------------------------------------------------------------
N                     924             908             894             892   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes that do not affect the statistical significance of treatment.
. 
. 
. *===========================================
. * EFFECT OF REVOLUTION ON POLITICAL KILLING
. *===========================================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE, AND VISUAL RESULTS  
. *       PRESENTED IN FIGURE 9.10
. * Will test for treatment effects and check treatment effect estimation assumptions
. 
. * SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "vdclkill"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. global condvar = "success==1 & leftist==1"

. quietly{

. quietly: chp9matchmultimp

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0000
                                                Largest FMI       =     0.0000
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       6.55
                                                        avg       =       6.55
Within VCE type:       Robust                           max       =       6.55

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
    vdclkill | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .1082384    .460596     0.23   0.821    -.9964197    1.212897
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0246046     .01334     1.84   0.111    -.0073891    .0565983
          2  |    .014198   .0240836     0.59   0.575    -.0435623    .0719584
          3  |   -.074204   .1730079    -0.43   0.682    -.4891328    .3407248
          4  |   .0459419    .125251     0.37   0.725    -.2544505    .3463343
          5  |    .074467   .1248946     0.60   0.571    -.2250707    .3740047
          6  |   .0719179   .1360092     0.53   0.614    -.2542762     .398112
          7  |   .0088874   .1447234     0.06   0.953    -.3382062     .355981
          8  |  -.0272697   .1395424    -0.20   0.851    -.3619375     .307398
          9  |  -.0523246   .1432932    -0.37   0.727     -.395988    .2913389
         10  |  -.0386258   .1387716    -0.28   0.789    -.3714449    .2941933
             |
       _cons |   1.450289    .170296     8.52   0.000     1.041864    1.858714
------------------------------------------------------------------------------

.         * RESULT:  Positive but statistically insignificant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 6.9344258   p-value = .03002258

.         * RESULT: Statistically significant evidence (at the .05 level) of violations of the parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 3.7369509   p-value = .07144315

.         * RESULT: Marginally significant evidence (at the .10 level) that the effects were observed prior to treatment.
.         *       Treatment likely related to levels of political killing.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #75" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph75.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph75.pdf saved as PDF format

.         * RESULT:  Lags are statistically insignificant, positive, and relatively stable.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdclkill
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat               0.108                                                                   
                   (0.23)                                                                   
alttreat                          -0.0692*        -0.0724+          0.398           0.225   
                                  (-2.65)         (-2.14)          (0.97)          (1.11)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                               0.131           0.156          -0.240         -0.0607   
                                   (0.29)          (0.34)         (-0.95)         (-0.17)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Alternative treatments may be at work prior to revolution, but do not affect the statistical insignificance of trea
> tment.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdclkill
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat               0.108           0.248           0.276           0.176   
                  (0.461)         (0.263)         (0.409)         (0.272)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.546***                        0.665***
                                 (0.0496)                        (0.0458)   
laggeddv2                                           0.264*         -0.160*  
                                                 (0.0873)        (0.0659)   
----------------------------------------------------------------------------
N                     374             374             374             374   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes that do not affect the statistical insignificance of treatment.
. 
. 
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. global condvar = "success==1 & urbancivic==1"

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        946
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0979
                                                Largest FMI       =     0.0511
                                                Complete DF       =         25
DF adjustment:   Small sample                   DF:     min       =      22.12
                                                        avg       =      22.87
Within VCE type:       Robust                           max       =      23.21

                                (Within VCE adjusted for 26 clusters in revid)
------------------------------------------------------------------------------
    vdclkill | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |    .767842   .1416089     5.42   0.000     .4748301    1.060854
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |  -.0006727   .0167112    -0.04   0.968    -.0352249    .0338795
          2  |    -.03215   .0532229    -0.60   0.552    -.1421938    .0778938
          3  |  -.2780807   .1113182    -2.50   0.020    -.5083107   -.0478507
          4  |   .0851276   .0673627     1.26   0.219    -.0542684    .2245236
          5  |   .0719125   .0705071     1.02   0.318     -.074034     .217859
          6  |    .040846   .0717643     0.57   0.575    -.1076046    .1892966
          7  |   .0491895   .0809795     0.61   0.550    -.1183488    .2167278
          8  |   .0230977   .0818816     0.28   0.780    -.1463666    .1925621
          9  |   .0317378    .081649     0.39   0.701    -.1374798    .2009555
         10  |   .0983695   .1037287     0.95   0.353     -.116681      .31342
             |
       _cons |   1.878907   .0785176    23.93   0.000     1.716563     2.04125
------------------------------------------------------------------------------

.         * RESULT:  Positive and statistically significant at the .001 level.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .62865963   p-value = .43530788

.         * RESULT: No evidence for violation of the parallel trends assumption.
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.2207352   p-value = .31200237

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #76" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph76.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph76.pdf saved as PDF format

.         * RESULT:  Lags are positive, statistically significant, and relatively stable over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdclkill
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat               0.768***                                                                
                   (5.42)                                                                   
alttreat                          -0.0916         -0.0150           0.473*          0.230   
                                  (-1.29)         (-0.20)          (2.53)          (1.67)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                               0.798***        0.778***        0.354*          0.595***
                                   (5.41)          (5.00)          (2.32)          (4.54)   
--------------------------------------------------------------------------------------------
N                     946             946             946             946             946   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Alternative treatments at t+1 is statistically significant, but does not affect the statistical significance of tre
> atment.
.         *       Implies that some of the effect may occur in the first year after revolution as well.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdclkill
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat               0.768***        0.536***        0.791***        0.586***
                  (0.142)         (0.123)         (0.133)         (0.115)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.399***                        0.460***
                                 (0.0601)                        (0.0518)   
laggeddv2                                           0.142*         -0.108** 
                                                 (0.0554)        (0.0295)   
----------------------------------------------------------------------------
N                     946             930             916             914   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes that do not affect the statistical significance of treatment.
. 
. 
. *====================================================
. * EFFECT OF REVOLUTION ON POLITICAL CIVIL LIBERTIES
. *====================================================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE, AND VISUAL RESULTS  
. *       PRESENTED IN FIGURE 9.11
. * Will test for treatment effects and check treatment effect estimation assumptions
. 
. * SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "vdpolitlib"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. global condvar = "success==1 & leftist==1"

. quietly{

. quietly: chp9matchmultimp

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0000
                                                Largest FMI       =     0.0000
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       6.55
                                                        avg       =       6.55
Within VCE type:       Robust                           max       =       6.55

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
  vdpolitlib | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -.0443872   .1038819    -0.43   0.683    -.2935297    .2047553
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |  -.0019066    .002157    -0.88   0.408    -.0070798    .0032666
          2  |  -.0030047   .0030496    -0.99   0.359    -.0103186    .0043092
          3  |    .048584   .0467413     1.04   0.335    -.0635168    .1606848
          4  |   .0396797   .0358807     1.11   0.308    -.0463738    .1257332
          5  |    .032425   .0365636     0.89   0.407    -.0552664    .1201164
          6  |   .0205585   .0387801     0.53   0.614    -.0724487    .1135656
          7  |  -.0006452   .0431712    -0.01   0.989    -.1041838    .1028934
          8  |  -.0135845   .0493988    -0.27   0.792    -.1320587    .1048897
          9  |  -.0187893   .0499579    -0.38   0.719    -.1386045    .1010258
         10  |  -.0201015   .0504594    -0.40   0.703    -.1411194    .1009164
             |
       _cons |   .3463219   .0544844     6.36   0.001     .2156507    .4769932
------------------------------------------------------------------------------

.         * RESULT:  Negative but statistically insignificant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 3.0507022   p-value = .11884115

.         * RESULT: No statistically significant evidence of the parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.5175899   p-value = .14187041

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #77" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph77.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph77.pdf saved as PDF format

.         * RESULT:  Lags are statistically insignificant, negative, and relatively stable.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdpolitlib
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat             -0.0444                                                                   
                  (-0.43)                                                                   
alttreat                          -0.0155+        -0.0161         -0.0107         0.00321   
                                  (-1.92)         (-1.59)         (-0.15)          (0.07)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                             -0.0392         -0.0336         -0.0350         -0.0468   
                                  (-0.38)         (-0.33)         (-0.52)         (-0.55)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No alternative treatments that affect the statistical insignificance of treatment.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdpolitlib
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat             -0.0444          0.0104         -0.0196         -0.0143   
                  (0.104)        (0.0691)        (0.0963)        (0.0668)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.467***                        0.625***
                                 (0.0544)                        (0.0567)   
laggeddv2                                           0.133+         -0.231***
                                                 (0.0675)        (0.0321)   
----------------------------------------------------------------------------
N                     374             374             374             374   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes that do not affect the statistical insignificance of treatment.
. 
. 
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. global condvar = "success==1 & urbancivic==1"

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        946
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.1120
                                                Largest FMI       =     0.0184
                                                Complete DF       =         25
DF adjustment:   Small sample                   DF:     min       =      22.92
                                                        avg       =      23.14
Within VCE type:       Robust                           max       =      23.21

                                (Within VCE adjusted for 26 clusters in revid)
------------------------------------------------------------------------------
  vdpolitlib | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |    .244416   .0441461     5.54   0.000     .1531057    .3357262
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0023404   .0033406     0.70   0.491    -.0045665    .0092474
          2  |   .0061034   .0078246     0.78   0.443    -.0100747    .0222816
          3  |  -.0236234   .0316158    -0.75   0.462    -.0890038     .041757
          4  |   .1092318   .0395406     2.76   0.011     .0274683    .1909954
          5  |   .1162208   .0429632     2.71   0.013      .027377    .2050645
          6  |    .110772   .0471387     2.35   0.028     .0133022    .2082419
          7  |   .1071649   .0480649     2.23   0.036     .0077775    .2065523
          8  |   .0994119   .0497314     2.00   0.057    -.0034294    .2022531
          9  |     .09408   .0502154     1.87   0.074    -.0097804    .1979404
         10  |   .1019916   .0509545     2.00   0.057    -.0034365    .2074197
             |
       _cons |   .4068155   .0365735    11.12   0.000      .331196    .4824349
------------------------------------------------------------------------------

.         * RESULT:  Positive and statistically significant at the .001 level.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 3.5342034   p-value = .0718177

.         * RESULT: Marginally statistically significant evidence (at the .10 level) for violation of the parallel trends assumption.
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.1588483   p-value = .13649823

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #78" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph78.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph78.pdf saved as PDF format

.         * RESULT:  Lags are positive, statistically significant, though slightly declining over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdpolitlib
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat               0.244***                                                                
                   (5.54)                                                                   
alttreat                          -0.0118         -0.0177+          0.193***       0.0809*  
                                  (-1.61)         (-2.02)          (4.08)          (2.38)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                               0.248***        0.256***       0.0758+          0.184***
                                   (5.60)          (5.71)          (1.83)          (5.17)   
--------------------------------------------------------------------------------------------
N                     946             946             946             946             946   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Alternative treatment at t+1 is statistically significant and turns the statistical significance of treatment margi
> nally significant (at the .10 level).
.         *       Implies that much of the effect is only evident in the first year after revolution.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdpolitlib
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat               0.244***        0.132***        0.222***        0.152***
                 (0.0441)        (0.0319)        (0.0388)        (0.0307)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.540***                        0.616***
                                 (0.0518)                        (0.0496)   
laggeddv2                                           0.261***       -0.127***
                                                 (0.0545)        (0.0268)   
----------------------------------------------------------------------------
N                     946             930             916             914   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes that do not affect the statistical significance of treatment.
. 
. 
. *=================================================
. * EFFECT OF REVOLUTION ON PRIVATE CIVIL LIBERTIES
. *=================================================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE, AND VISUAL RESULTS  
. *       PRESENTED IN FIGURE 9.12
. * Will test for treatment effects and check treatment effect estimation assumptions
. 
. // SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "vdclpriv"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. global condvar = "success==1 & leftist==1"

. quietly{

. quietly: chp9matchmultimp

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0000
                                                Largest FMI       =     0.0000
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       6.55
                                                        avg       =       6.55
Within VCE type:       Robust                           max       =       6.55

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
    vdclpriv | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -.0840937   .0890098    -0.94   0.378    -.2975679    .1293804
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0010163   .0031411     0.32   0.756    -.0065171    .0085497
          2  |   .0010346   .0032681     0.32   0.761    -.0068035    .0088726
          3  |   .0684767   .0248101     2.76   0.030     .0089742    .1279793
          4  |   .0631124   .0348503     1.81   0.116    -.0204699    .1466947
          5  |   .0615892   .0359591     1.71   0.133    -.0246524    .1478307
          6  |   .0543216   .0376525     1.44   0.195    -.0359813    .1446245
          7  |   .0546773   .0377592     1.45   0.194    -.0358815    .1452361
          8  |   .0454242    .036506     1.24   0.256    -.0421289    .1329774
          9  |   .0345143   .0371805     0.93   0.386    -.0546566    .1236853
         10  |   .0305821   .0381465     0.80   0.451    -.0609054    .1220696
             |
       _cons |   .3812441   .0504237     7.56   0.000     .2603117    .5021764
------------------------------------------------------------------------------

.         * RESULT:  Negative but statistically insignificant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 3.3575196   p-value = .10426039

.         * RESULT: No statistically significant evidence of the parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.0887455   p-value = .1862639

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #79" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph79.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph79.pdf saved as PDF format

.         * RESULT:  Lags are statistically insignificant, negative, and grow increasingly negative over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdclpriv
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat             -0.0841                                                                   
                  (-0.94)                                                                   
alttreat                         -0.00997        -0.00646+        -0.0557         -0.0489   
                                  (-1.71)         (-1.99)         (-0.99)         (-1.46)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                             -0.0808         -0.0798         -0.0354         -0.0474   
                                  (-0.91)         (-0.90)         (-0.64)         (-0.67)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No alternative treatments that affect the statistical insignificance of treatment.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdclpriv
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat             -0.0841         -0.0108         -0.0467         -0.0349   
                 (0.0890)        (0.0589)        (0.0739)        (0.0530)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.461***                        0.607** 
                                 (0.0679)                         (0.109)   
laggeddv2                                           0.161**        -0.204*  
                                                 (0.0410)        (0.0710)   
----------------------------------------------------------------------------
N                     374             374             374             374   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes that do not affect the statistical insignificance of treatment.
. 
. 
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. global condvar = "success==1 & urbancivic==1"

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        946
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.1762
                                                Largest FMI       =     0.0211
                                                Complete DF       =         25
DF adjustment:   Small sample                   DF:     min       =      22.86
                                                        avg       =      23.12
Within VCE type:       Robust                           max       =      23.21

                                (Within VCE adjusted for 26 clusters in revid)
------------------------------------------------------------------------------
    vdclpriv | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .1275554   .0347602     3.67   0.001     .0556592    .1994515
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0024379   .0015417     1.58   0.127    -.0007497    .0056256
          2  |   .0029043   .0033397     0.87   0.393    -.0040008    .0098095
          3  |  -.0052214   .0202804    -0.26   0.799    -.0471644    .0367215
          4  |   .0515613   .0239411     2.15   0.042     .0020512    .1010713
          5  |   .0550717   .0245418     2.24   0.035     .0043174    .1058259
          6  |   .0638346   .0307942     2.07   0.049      .000161    .1275081
          7  |   .0678577   .0308835     2.20   0.038      .003999    .1317164
          8  |   .0677463   .0309136     2.19   0.039     .0038204    .1316722
          9  |   .0665311   .0314109     2.12   0.045     .0015529    .1315094
         10  |   .0733856   .0334403     2.19   0.039     .0041853     .142586
             |
       _cons |   .5278914   .0261358    20.20   0.000     .4738531    .5819298
------------------------------------------------------------------------------

.         * RESULT:  Positive and statistically significant at the .001 level.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 4.2696872   p-value = .0493057

.         * RESULT: Statistically significant evidence (at the .05 level) for violation of the parallel trends assumption.
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.883553   p-value = .07467358

.         * RESULT: Marginally significant evidence (at the .10 level) that the effects were observed prior to treatment.
.         *       Treatment likely related to private civil liberties.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #80" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph80.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph80.pdf saved as PDF format

.         * RESULT:  Lags are positive, statistically significant, though declining over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdclpriv
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat               0.128**                                                                 
                   (3.67)                                                                   
alttreat                         -0.00760+        -0.0122*         0.0653+         0.0203   
                                  (-1.73)         (-2.26)          (2.00)          (0.83)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                               0.130**         0.136***       0.0704*          0.112***
                                   (3.72)          (3.85)          (2.69)          (3.98)   
--------------------------------------------------------------------------------------------
N                     946             946             946             946             946   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Alternative treatment at t-1 is statistically significant but does not alter the statistical significance of treatm
> ent.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdclpriv
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat               0.128**        0.0725**         0.129***       0.0941***
                 (0.0348)        (0.0258)        (0.0329)        (0.0240)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.460***                        0.540***
                                 (0.0657)                        (0.0634)   
laggeddv2                                           0.183**        -0.138***
                                                 (0.0582)        (0.0344)   
----------------------------------------------------------------------------
N                     946             930             916             914   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes that do not affect the statistical significance of treatment.
. 
. 
. *=========================================
. * EFFECT OF REVOLUTION ON THE RULE OF LAW
. *=========================================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE, AND VISUAL RESULTS  
. *       PRESENTED IN FIGURE 9.13
. * Will test for treatment effects and check treatment effect estimation assumptions
. 
. * SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "vdrule"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. global condvar = "success==1 & leftist==1"

. quietly{

. quietly: chp9matchmultimp

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0000
                                                Largest FMI       =     0.0000
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       6.55
                                                        avg       =       6.55
Within VCE type:       Robust                           max       =       6.55

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
      vdrule | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -.0035438   .0685614    -0.05   0.960    -.1679762    .1608885
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |  -.0007633   .0006873    -1.11   0.306    -.0024116     .000885
          2  |  -.0026296   .0022374    -1.18   0.281    -.0079956    .0027364
          3  |   .0276227   .0371728     0.74   0.483    -.0615297     .116775
          4  |   .0376293   .0296638     1.27   0.248    -.0335142    .1087727
          5  |    .036649   .0306778     1.19   0.274    -.0369263    .1102242
          6  |   .0359307   .0318937     1.13   0.300    -.0405607    .1124222
          7  |   .0289676   .0319628     0.91   0.397    -.0476896    .1056248
          8  |   .0159901   .0330227     0.48   0.644    -.0632091    .0951892
          9  |   .0136451   .0339324     0.40   0.700    -.0677357    .0950259
         10  |   .0144413   .0340856     0.42   0.685    -.0673071    .0961897
             |
       _cons |   .3262222   .0333501     9.78   0.000      .246238    .4062065
------------------------------------------------------------------------------

.         * RESULT:  Negative but statistically insignificant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .0251996   p-value = .87780494

.         * RESULT: No statistically significant evidence of the parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .53146655   p-value = .60713441

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #81" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph81.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph81.pdf saved as PDF format

.         * RESULT:  Lags are statistically insignificant and hover around zero.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdrule
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat            -0.00354                                                                   
                  (-0.05)                                                                   
alttreat                          0.00115        -0.00222          0.0223         0.00932   
                                   (0.33)         (-0.56)          (0.38)          (0.27)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                            -0.00393        -0.00207         -0.0231         -0.0105   
                                  (-0.06)         (-0.03)         (-0.66)         (-0.22)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No alternative treatments that affect the statistical insignificance of treatment.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdrule
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat            -0.00354          0.0278          0.0206          0.0159   
                 (0.0686)        (0.0485)        (0.0659)        (0.0510)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.364**                         0.452** 
                                 (0.0774)                        (0.0810)   
laggeddv2                                           0.144          -0.117   
                                                 (0.0841)        (0.0643)   
----------------------------------------------------------------------------
N                     374             374             374             374   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 processes that do not affect the statistical insignificance of treatment.
. 
. 
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. global condvar = "success==1 & urbancivic==1"

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        946
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.1689
                                                Largest FMI       =     0.1004
                                                Complete DF       =         25
DF adjustment:   Small sample                   DF:     min       =      20.79
                                                        avg       =      22.70
Within VCE type:       Robust                           max       =      23.21

                                (Within VCE adjusted for 26 clusters in revid)
------------------------------------------------------------------------------
      vdrule | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .1618993   .0379154     4.27   0.000     .0834803    .2403182
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0027343   .0024849     1.10   0.282    -.0024035    .0078722
          2  |   .0033051   .0039436     0.84   0.411    -.0048487    .0114588
          3  |  -.0218874   .0140447    -1.56   0.133    -.0509433    .0071686
          4  |   .0143802    .014889     0.97   0.344    -.0164205    .0451809
          5  |   .0295384   .0128941     2.29   0.032     .0028527    .0562241
          6  |   .0273926   .0130977     2.09   0.048     .0002994    .0544859
          7  |   .0287063   .0132371     2.17   0.041     .0013234    .0560892
          8  |   .0258319   .0134746     1.92   0.068    -.0020646    .0537284
          9  |   .0229387   .0135488     1.69   0.105    -.0052017    .0510791
         10  |   .0254434   .0153304     1.66   0.112    -.0064573    .0573441
             |
       _cons |    .326081   .0154781    21.07   0.000     .2940784    .3580835
------------------------------------------------------------------------------

.         * RESULT:  Positive and statistically significant at the .001 level.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .31306655   p-value = .58078334

.         * RESULT: No statistically significant evidence for violation of the parallel trends assumption.
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 3.3084289   p-value = .053121

.         * RESULT: Marginally significant evidence (at the .10 level) that the effects were observed prior to treatment.
.         *       Treatment likely related to rule of law.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #82" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph82.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph82.pdf saved as PDF format

.         * RESULT:  Lags are positive, statistically significant, and slightly declining over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdrule
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat               0.162***                                                                
                   (4.27)                                                                   
alttreat                         -0.00818         0.00115          0.0656*         0.0411   
                                  (-1.34)          (0.16)          (2.16)          (1.60)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                               0.165***        0.161***        0.105**         0.131***
                                   (4.33)          (4.17)          (3.58)          (4.55)   
--------------------------------------------------------------------------------------------
N                     946             946             946             946             946   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Alternative treatment at t-1 is statistically significant but does not alter the statistical significance of treatm
> ent.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdrule
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat               0.162***        0.128***        0.167***        0.132***
                 (0.0379)        (0.0290)        (0.0365)        (0.0290)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.346***                        0.403***
                                 (0.0441)                        (0.0413)   
laggeddv2                                           0.158***      -0.0760*  
                                                 (0.0390)        (0.0277)   
----------------------------------------------------------------------------
N                     946             930             916             914   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes that do not affect the statistical significance of treatment.
. 
. 
. *===================================================
. * EFFECT OF REVOLUTION ON GOVERNMENT ACCOUNTABILITY
. *===================================================
. * REGRESSION RESULTS PRESENTED IN CHAPTER 9 DO-FILE, AND VISUAL RESULTS  
. *       PRESENTED IN FIGURE 9.14
. * Will test for treatment effects and check treatment effect estimation assumptions
. 
. * SUCCESSFUL SOCIAL VS. MATCHED COUNTERPARTS
. use matcheddiffindifflong.dta, clear

. global yvar = "vdaccount"

. global notetext "SUCCESSFUL SOCIAL VS. MATCHED CASES"

. global condvar = "success==1 & leftist==1"

. quietly{

. quietly: chp9matchmultimp

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful social rev vs. no rev contention in matched counterparts
. quietly: mi passive: generate treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        374
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.0000
                                                Largest FMI       =     0.0000
                                                Complete DF       =          8
DF adjustment:   Small sample                   DF:     min       =       6.55
                                                        avg       =       6.55
Within VCE type:       Robust                           max       =       6.55

                                 (Within VCE adjusted for 9 clusters in revid)
------------------------------------------------------------------------------
   vdaccount | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |  -.0178619   .0652798    -0.27   0.793    -.1744239    .1387002
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |  -.0013163     .00197    -0.67   0.527    -.0060411    .0034084
          2  |  -.0030263   .0025859    -1.17   0.283     -.009228    .0031754
          3  |   .0412914   .0286452     1.44   0.196    -.0274091    .1099919
          4  |   .0248631   .0231562     1.07   0.321     -.030673    .0803992
          5  |   .0128832   .0243757     0.53   0.615    -.0455777     .071344
          6  |   .0086564   .0254413     0.34   0.744    -.0523599    .0696728
          7  |  -.0026089   .0278738    -0.09   0.928    -.0694593    .0642414
          8  |  -.0062228   .0303989    -0.20   0.844    -.0791291    .0666835
          9  |  -.0138122   .0332001    -0.42   0.691    -.0934368    .0658125
         10  |  -.0145192   .0344771    -0.42   0.687    -.0972065     .068168
             |
       _cons |   .3689422   .0330339    11.17   0.000     .2897161    .4481683
------------------------------------------------------------------------------

.         * RESULT:  Negative but statistically insignificant.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 4.2406031   p-value = .07344295

.         * RESULT: Marginally statistically significant evidence (at the .10 level) of the parallel trends assumption
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 2.3059144   p-value = .16190031

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #83" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph83.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph83.pdf saved as PDF format

.         * RESULT:  Lags are statistically insignificant and hover around zero, though largely negative.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdaccount
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat             -0.0179                                                                   
                  (-0.27)                                                                   
alttreat                         -0.00553        -0.00605+        -0.0321         -0.0205   
                                  (-1.49)         (-2.01)         (-0.63)         (-0.58)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                             -0.0160         -0.0138          0.0103        -0.00247   
                                  (-0.25)         (-0.21)          (0.30)         (-0.05)   
--------------------------------------------------------------------------------------------
N                     374             374             374             374             374   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  No alternative treatments that affect the statistical insignificance of treatment.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdaccount
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat             -0.0179          0.0207         0.00938         0.00525   
                 (0.0653)        (0.0382)        (0.0549)        (0.0380)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.492***                        0.628***
                                 (0.0763)                        (0.0647)   
laggeddv2                                           0.197          -0.189** 
                                                  (0.104)        (0.0434)   
----------------------------------------------------------------------------
N                     374             374             374             374   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 (and possibly AR2) processes that do not affect the statistical insignificance of treatment.
. 
. 
. // SUCCESSFUL URBAN CIVIC VS. MATCHED COUNTERPARTS
. global notetext "SUCCESSFUL URBAN CIVIC VS. MATCHED CASES"

. global condvar = "success==1 & urbancivic==1"

. //
. // Testing for a statistically significant "treatment" effect
. * Treatment consists of experiencing a successful urban civic rev vs. no rev contention in matched counterparts
. quietly: mi passive: replace treat=0

. quietly: mi passive: replace treat=1 if $condvar & year>2 & revny==1

. mi estimate, cmdok post dots saving(miest, replace): xtdidregress ($yvar) (treat) if $condvar [pweight=freqwt], group(diffid) time(yea
> r) vce(cluster revid) 

Imputations (10):
  .........10 done

Multiple-imputation estimates                   Imputations       =         10
                                                Number of obs     =        913
Group variable: 
                                                Number of groups  =          .
                                                Obs per group:
                                                              min =          .
                                                              avg =          .
                                                              max =          .
                                                Average RVI       =     0.1505
                                                Largest FMI       =     0.0455
                                                Complete DF       =         24
DF adjustment:   Small sample                   DF:     min       =      21.33
                                                        avg       =      21.84
Within VCE type:       Robust                           max       =      22.22

                                (Within VCE adjusted for 25 clusters in revid)
------------------------------------------------------------------------------
   vdaccount | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
ATET         |
       treat |
   (1 vs 0)  |   .1728887   .0301623     5.73   0.000     .1102564    .2355211
-------------+----------------------------------------------------------------
Controls     |
        year |
          1  |   .0052052    .002171     2.40   0.025     .0007055    .0097049
          2  |   .0026617   .0042692     0.62   0.539     -.006187    .0115103
          3  |  -.0104508   .0172177    -0.61   0.550    -.0461869    .0252853
          4  |   .0473255   .0227588     2.08   0.049     .0001177    .0945333
          5  |   .0543914   .0255069     2.13   0.044      .001496    .1072869
          6  |   .0550424   .0271445     2.03   0.055    -.0012503    .1113351
          7  |   .0494608   .0279408     1.77   0.091    -.0085049    .1074265
          8  |   .0466406    .028752     1.62   0.119    -.0130405    .1063218
          9  |   .0471225   .0294843     1.60   0.125    -.0141357    .1083806
         10  |   .0595588   .0312357     1.91   0.070    -.0053358    .1244534
             |
       _cons |    .420095   .0221418    18.97   0.000     .3742024    .4659876
------------------------------------------------------------------------------

.         * RESULT:  Positive and statistically significant at the .001 level.
. //
. // TESTS FOR THE INTEGRITY OF THE TREATMENT EFFECT ESTIMATION
. * I) Test for pre-treatment parallel trends (whether linear trends in the outcome variable  
. *       are parallel between control and treatment groups in the pretreatment period).
. *    Statistical significance indicates that trends are not parallel.
. quietly: chp9matchptrends

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = 1.1002472   p-value = .30466047

.         * RESULT: No statistically significant evidence for violation of the parallel trends assumption.
. //
. * II) Granger test for whether treatment effects are observed in anticipation of actual treatment
. *       Statistical significance indicates that effects are observed prior to treatment.
. quietly: chp9matchgranger

. quietly: mi query

. quietly: local M = r(M)

. di as txt "Averaged over " as res `M' as txt " imputations: F-score = " as res finalfscore as txt "   p-value = " as res finalpvalue
Averaged over 10 imputations: F-score = .85379012   p-value = .4383293

.         * RESULT: No statistically significant evidence that the effects were observed prior to treatment.
. //
. * III) Grangerplot of lags and leads of the treatment time variable.
. *       Used to assess whether there are any changes in the treatment effect over the post-treatment time period. 
. *       Visual evidence. Uses all available leads and lags, with effects normalized to first lead.quietly: chp9matchgrangerplot 
. quietly: chp9matchgrangerplot

. coefplot matrix(B[1]), ci((B[2] B[3])) vertical yline(0, lcolor(black) lwidth(thin) lpattern(dash)) caption({bf: $notetext }, size(med
> large) justification(center) alignment(bottom)) ciopts(recast(rcap)) note("Graph #84" , span) title("`titvar1'" "Effects over time (le
> ads & lags w 95% CIs)", size(large)) ylabel(, angle(horizontal))

. graph export Robustnesstestfiles\Logfiles\robch9graph84.pdf, replace
file Robustnesstestfiles\Logfiles\robch9graph84.pdf saved as PDF format

.         * RESULT:  Lags are positive, statistically significant, and slightly declining over time.
. //
. * IV) Test for the influence of alternative treatments in surrounding periods
. *       Examines whether there may be other "treatments" before or after revolution that affect the relationship
. *       Uses these alternative periods as the treatment effect and then tests whether the actual treatment period remains statisticall
> y significant.
. quietly: chp9matchalttreat

. esttab , drop (*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("Rev" "Alt, t-2" "Alt, t-1" "Alt, t+1" "Alt, t+2"
> ) nonumbers title("Possible alternative treatment effects for " $yvar) coeflabels(r1vs0.treat "treat" r1vs0.alttreat "alttreat")

Possible alternative treatment effects for  vdaccount
--------------------------------------------------------------------------------------------
                      Rev        Alt, t-2        Alt, t-1        Alt, t+1        Alt, t+2   
--------------------------------------------------------------------------------------------
ATET                                                                                        
treat               0.173***                                                                
                   (5.73)                                                                   
alttreat                         -0.00906         -0.0111          0.0923**        0.0431*  
                                  (-0.94)         (-1.14)          (3.60)          (2.17)   
--------------------------------------------------------------------------------------------
Controls                                                                                    
treat                               0.176***        0.180***       0.0921**         0.141***
                                   (5.79)          (5.88)          (3.62)          (5.56)   
--------------------------------------------------------------------------------------------
N                     913             913             913             913             913   
--------------------------------------------------------------------------------------------
t statistics in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT:  Alternative treatments at t-1 and t-2 are statistically significant but do not alter the statistical significance o
> f treatment.
.         *       Points to critical post-revolutionary processes in establishing government accountability.
. //
. * V) Lagged DV test
. *       Controls for possible effect of lagged values of the dependent variable on treatment the effect (up to 2 lags)
. quietly: chp9matchdvlag

. esttab , se drop(*.year _cons)  star (+ 0.10 * 0.05 ** 0.01 *** 0.001) nogaps  mtitles("No lag" "AR 1" "AR 2" "AR 1,2") nonumbers titl
> e("Testing for the possible effect of lagged values of the dependent variable for" $yvar) coeflabels(r1vs0.treat "treat")

Testing for the possible effect of lagged values of the dependent variable for vdaccount
----------------------------------------------------------------------------
                   No lag            AR 1            AR 2          AR 1,2   
----------------------------------------------------------------------------
ATET                                                                        
treat               0.173***       0.0957***        0.149***        0.106***
                 (0.0302)        (0.0241)        (0.0281)        (0.0230)   
----------------------------------------------------------------------------
Controls                                                                    
laggeddv1                           0.520***                        0.620***
                                 (0.0675)                        (0.0688)   
laggeddv2                                           0.257**        -0.144***
                                                 (0.0727)        (0.0346)   
----------------------------------------------------------------------------
N                     913             898             883             883   
----------------------------------------------------------------------------
Standard errors in parentheses
+ p<0.10, * p<0.05, ** p<0.01, *** p<0.001

.         * RESULT: Evidence for AR1 and AR2 processes that do not affect the statistical significance of treatment.
. 
.  
. log close
      name:  <unnamed>
       log:  C:\Users\mbeissin\Desktop\Stata files for book\Robustnesstestfiles\Logfiles\robustnesstestschapter9.log
  log type:  text
 closed on:  26 Jan 2022, 15:57:42
----------------------------------------------------------------------------------------------------------------------------------------
